chiark / gitweb /
[PATCH] oops forgot to add the new klibc/include directory
[elogind.git] / klibc / include / sys / vfs.h
1 /*
2  * sys/vfs.h
3  */
4
5 #ifndef _SYS_VFS_H
6 #define _SYS_VFS_H
7
8 #include <stdint.h>
9 #include <klibc/extern.h>
10 #include <sys/types.h>
11
12 /* struct statfs64 -- there seems to be two standards -
13    one for 32 and one for 64 bits, and they're incompatible... */
14
15 #if BITSIZE == 32 || defined(__s390__)
16
17 struct statfs {
18         uint32_t f_type;
19         uint32_t f_bsize;
20         uint64_t f_blocks;
21         uint64_t f_bfree;
22         uint64_t f_bavail;
23         uint64_t f_files;
24         uint64_t f_ffree;
25         __kernel_fsid_t f_fsid;
26         uint32_t f_namelen;
27         uint32_t f_frsize;
28         uint32_t f_spare[5];
29 };
30
31 #else /* BITSIZE == 64 */
32
33 struct statfs {
34         uint64_t f_type;
35         uint64_t f_bsize;
36         uint64_t f_blocks;
37         uint64_t f_bfree;
38         uint64_t f_bavail;
39         uint64_t f_files;
40         uint64_t f_ffree;
41         __kernel_fsid_t f_fsid;
42         uint64_t f_namelen;
43         uint64_t f_frsize;
44         uint64_t f_spare[5];
45 };
46
47 #endif /* BITSIZE */
48
49 __extern int statfs(const char *, struct statfs *);
50 __extern int fstatfs(int, struct statfs *);
51
52 /* Various filesystem types */
53 #define ADFS_SUPER_MAGIC        0xadf5
54 #define AFFS_SUPER_MAGIC        0xadff
55 #define AFS_FS_MAGIC            0x6B414653 /* 'kAFS' */
56 #define AUTOFS_SUPER_MAGIC      0x0187
57 #define BFS_MAGIC               0x1BADFACE
58 #define CAPIFS_SUPER_MAGIC      0x434e
59 #define CIFS_MAGIC_NUMBER       0xFF534D42
60 #define CODA_SUPER_MAGIC        0x73757245
61 #define CRAMFS_MAGIC            0x28cd3d45
62 #define DEVFS_SUPER_MAGIC       0x1373
63 #define DEVPTS_SUPER_MAGIC      0x1cd1
64 #define EFS_SUPER_MAGIC         0x414A53
65 #define EVENTPOLLFS_MAGIC       0x03111965
66 #define EXT2_SUPER_MAGIC        0xEF53
67 #define EXT3_SUPER_MAGIC        0xEF53
68 #define GADGETFS_MAGIC          0xaee71ee7
69 #define HFSPLUS_SUPER_MAGIC     0x482b
70 #define HFS_MFS_SUPER_MAGIC     0xD2D7     /* MFS MDB (super block) */
71 #define HFS_SUPER_MAGIC         0x4244     /* "BD": HFS MDB (super block) */
72 #define HPFS_SUPER_MAGIC 0xf995e849
73 #define HUGETLBFS_MAGIC         0x958458f6
74 #define HWGFS_MAGIC             0x12061983
75 #define IBMASMFS_MAGIC          0x66726f67
76 #define ISOFS_SUPER_MAGIC       0x9660
77 #define JFFS2_SUPER_MAGIC       0x72b6
78 #define JFFS_MAGIC_BITMASK      0x34383931 /* "1984" */
79 #define JFFS_MAGIC_SB_BITMASK   0x07c0     /* 1984 */
80 #define JFS_SUPER_MAGIC         0x3153464a /* "JFS1" */
81 #define MINIX2_SUPER_MAGIC      0x2468     /* minix V2 fs */
82 #define MINIX2_SUPER_MAGIC2     0x2478     /* minix V2 fs, 30 char names */
83 #define MINIX_SUPER_MAGIC       0x137F     /* original minix fs */
84 #define MINIX_SUPER_MAGIC2      0x138F     /* minix fs, 30 char names */
85 #define MSDOS_SUPER_MAGIC       0x4d44     /* MD */
86 #define NCP_SUPER_MAGIC         0x564c
87 #define NFS_SUPER_MAGIC         0x6969
88 #define NFS_SUPER_MAGIC         0x6969
89 #define OPENPROM_SUPER_MAGIC    0x9fa1
90 #define OPROFILEFS_MAGIC        0x6f70726f
91 #define PFMFS_MAGIC             0xa0b4d889
92 #define PIPEFS_MAGIC            0x50495045
93 #define PROC_SUPER_MAGIC        0x9fa0
94 #define QNX4_SUPER_MAGIC        0x002f     /* qnx4 fs detection */
95 #define RAMFS_MAGIC             0x858458f6
96 #define REISERFS_SUPER_MAGIC    0x52654973
97 #define ROMFS_MAGIC             0x7275
98 #define SMB_SUPER_MAGIC         0x517B
99 #define SOCKFS_MAGIC            0x534F434B
100 #define SYSFS_MAGIC             0x62656572
101 #define TMPFS_MAGIC             0x01021994
102 #define UDF_SUPER_MAGIC         0x15013346
103 #define UFS_MAGIC               0x00011954
104 #define UFS_MAGIC_4GB           0x05231994 /* fs > 4 GB && fs_featurebits */
105 #define UFS_MAGIC_FEA           0x00195612 /* fs_featurebits supported */
106 #define UFS_MAGIC_LFN           0x00095014 /* fs supports filenames > 14 chars */
107 #define UFS_MAGIC_SEC           0x00612195 /* B1 security fs */
108 #define USBDEVICE_SUPER_MAGIC   0x9fa2
109 #define VXFS_SUPER_MAGIC        0xa501FCF5
110
111 #endif /* _SYS_VFS_H */