root/include/linux/stat.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_STAT_H
   2 #define _LINUX_STAT_H
   3 
   4 struct old_stat {
   5         unsigned short st_dev;
   6         unsigned short st_ino;
   7         unsigned short st_mode;
   8         unsigned short st_nlink;
   9         unsigned short st_uid;
  10         unsigned short st_gid;
  11         unsigned short st_rdev;
  12         unsigned long  st_size;
  13         unsigned long  st_atime;
  14         unsigned long  st_mtime;
  15         unsigned long  st_ctime;
  16 };
  17 
  18 struct new_stat {
  19         unsigned short st_dev;
  20         unsigned short __pad1;
  21         unsigned long st_ino;
  22         unsigned short st_mode;
  23         unsigned short st_nlink;
  24         unsigned short st_uid;
  25         unsigned short st_gid;
  26         unsigned short st_rdev;
  27         unsigned short __pad2;
  28         unsigned long  st_size;
  29         unsigned long  st_blksize;
  30         unsigned long  st_blocks;
  31         unsigned long  st_atime;
  32         unsigned long  __unused1;
  33         unsigned long  st_mtime;
  34         unsigned long  __unused2;
  35         unsigned long  st_ctime;
  36         unsigned long  __unused3;
  37         unsigned long  __unused4;
  38         unsigned long  __unused5;
  39 };
  40 
  41 #define S_IFMT  00170000
  42 #define S_IFSOCK 0140000
  43 #define S_IFLNK  0120000
  44 #define S_IFREG  0100000
  45 #define S_IFBLK  0060000
  46 #define S_IFDIR  0040000
  47 #define S_IFCHR  0020000
  48 #define S_IFIFO  0010000
  49 #define S_ISUID  0004000
  50 #define S_ISGID  0002000
  51 #define S_ISVTX  0001000
  52 
  53 #define S_ISLNK(m)      (((m) & S_IFMT) == S_IFLNK)
  54 #define S_ISREG(m)      (((m) & S_IFMT) == S_IFREG)
  55 #define S_ISDIR(m)      (((m) & S_IFMT) == S_IFDIR)
  56 #define S_ISCHR(m)      (((m) & S_IFMT) == S_IFCHR)
  57 #define S_ISBLK(m)      (((m) & S_IFMT) == S_IFBLK)
  58 #define S_ISFIFO(m)     (((m) & S_IFMT) == S_IFIFO)
  59 #define S_ISSOCK(m)     (((m) & S_IFMT) == S_IFSOCK)
  60 
  61 #define S_IRWXU 00700
  62 #define S_IRUSR 00400
  63 #define S_IWUSR 00200
  64 #define S_IXUSR 00100
  65 
  66 #define S_IRWXG 00070
  67 #define S_IRGRP 00040
  68 #define S_IWGRP 00020
  69 #define S_IXGRP 00010
  70 
  71 #define S_IRWXO 00007
  72 #define S_IROTH 00004
  73 #define S_IWOTH 00002
  74 #define S_IXOTH 00001
  75 
  76 #endif

/* [previous][next][first][last][top][bottom][index][help] */