1/* Struct kernel_stat64 to stat64.  Linux/SPARC version.
 2   Copyright (C) 2020-2025 Free Software Foundation, Inc.
 3   This file is part of the GNU C Library.
 4
 5   The GNU C Library is free software; you can redistribute it and/or
 6   modify it under the terms of the GNU Lesser General Public
 7   License as published by the Free Software Foundation; either
 8   version 2.1 of the License, or (at your option) any later version.
 9
10   The GNU C Library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14
15   You should have received a copy of the GNU Lesser General Public
16   License along with the GNU C Library.  If not, see
17   <https://www.gnu.org/licenses/>.  */
18
19#include <errno.h>
20
21static inline void
22__cp_stat64_kstat64 (struct stat64 *st64, const struct kernel_stat64 *kst64)
23{
24  st64->st_dev = kst64->st_dev;
25  st64->__pad1 = 0;
26  st64->st_ino = kst64->st_ino;
27  st64->st_mode = kst64->st_mode;
28  st64->st_nlink = kst64->st_nlink;
29  st64->st_uid = kst64->st_uid;
30  st64->st_gid = kst64->st_gid;
31  st64->st_rdev = kst64->st_rdev;
32  st64->__pad2 = 0;
33  st64->st_size = kst64->st_size;
34  st64->st_blksize = kst64->st_blksize;
35  st64->st_blocks = kst64->st_blocks;
36  st64->st_atim.tv_sec = kst64->st_atime_sec;
37  st64->st_atim.tv_nsec = kst64->st_atime_nsec;
38  st64->st_mtim.tv_sec = kst64->st_mtime_sec;
39  st64->st_mtim.tv_nsec = kst64->st_mtime_nsec;
40  st64->st_ctim.tv_sec = kst64->st_ctime_sec;
41  st64->st_ctim.tv_nsec = kst64->st_ctime_nsec;
42  st64->__glibc_reserved4 = 0;
43  st64->__glibc_reserved5 = 0;
44}