Back to index

glibc  2.9
statconv.c
Go to the documentation of this file.
00001 /* Copyright (C) 2000 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 void
00020 __stat_aix_to_linux (const struct aixstat *aixstat, struct stat *linuxstat)
00021 {
00022   linuxstat->st_dev = makedev (aix_major (aixstat->st_dev),
00023                             aix_minor (aixstat->st_dev));
00024   linuxstat->st_ino = aixstat->st_ino;
00025   /* The following assumes that the mode values are the same on AIX
00026      and Linux which is true in the moment.  */
00027   linuxstat->st_mode = aixstat->st_mode;
00028   linuxstat->st_nlink = aixstat->st_nlink;
00029   /* There is no st_flag field in Linux.  */
00030   linuxstat->st_uid = aixstat->st_uid;
00031   linuxstat->st_gid = aixstat->st_gid;
00032   linuxstat->st_rdev = makedev (aix_major (aixstat->st_rdev),
00033                             aix_minor (aixstat->st_rdev));
00034   linuxstat->st_size = aixstat->st_size;
00035   linuxstat->st_atime = aixstat->st_atime;
00036   linuxstat->st_mtime = aixstat->st_mtime;
00037   linuxstat->st_ctime = aixstat->st_ctime;
00038   linuxstat->st_blksize = aixstat->st_blksize;
00039   linuxstat->st_blocks = aixstat->st_blocks;
00040   /* There is no st_vfstype in Linux.  */
00041   /* There is no st_vfs in Linux.  */
00042   /* There is no st_type in Linux.  */
00043   /* There is no st_gen in Linux.  */
00044 
00045   /* File in the padding values with repeatable values.  */
00046   linuxstat->__pad1 = 0;
00047   linuxstat->__pad2 = 0;
00048   linuxstat->__unused1 = 0;
00049   linuxstat->__unused2 = 0;
00050   linuxstat->__unused3 = 0;
00051   linuxstat->__unused4 = 0;
00052   linuxstat->__unused5 = 0;
00053 }