2.9
[glibc/nacl-glibc.git] / sysdeps / unix / sysv / linux / powerpc / aix / statconv.c
blob0d7b5f7809c6b044443c8d132df94ff9b383991a
1 /* Copyright (C) 2000 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
19 void
20 __stat_aix_to_linux (const struct aixstat *aixstat, struct stat *linuxstat)
22 linuxstat->st_dev = makedev (aix_major (aixstat->st_dev),
23 aix_minor (aixstat->st_dev));
24 linuxstat->st_ino = aixstat->st_ino;
25 /* The following assumes that the mode values are the same on AIX
26 and Linux which is true in the moment. */
27 linuxstat->st_mode = aixstat->st_mode;
28 linuxstat->st_nlink = aixstat->st_nlink;
29 /* There is no st_flag field in Linux. */
30 linuxstat->st_uid = aixstat->st_uid;
31 linuxstat->st_gid = aixstat->st_gid;
32 linuxstat->st_rdev = makedev (aix_major (aixstat->st_rdev),
33 aix_minor (aixstat->st_rdev));
34 linuxstat->st_size = aixstat->st_size;
35 linuxstat->st_atime = aixstat->st_atime;
36 linuxstat->st_mtime = aixstat->st_mtime;
37 linuxstat->st_ctime = aixstat->st_ctime;
38 linuxstat->st_blksize = aixstat->st_blksize;
39 linuxstat->st_blocks = aixstat->st_blocks;
40 /* There is no st_vfstype in Linux. */
41 /* There is no st_vfs in Linux. */
42 /* There is no st_type in Linux. */
43 /* There is no st_gen in Linux. */
45 /* File in the padding values with repeatable values. */
46 linuxstat->__pad1 = 0;
47 linuxstat->__pad2 = 0;
48 linuxstat->__unused1 = 0;
49 linuxstat->__unused2 = 0;
50 linuxstat->__unused3 = 0;
51 linuxstat->__unused4 = 0;
52 linuxstat->__unused5 = 0;