~mirabilos/klibc/master

« back to all changes in this revision

Viewing changes to include/sys/vfs.h

  • Committer: H. Peter Anvin
  • Date: 2006-05-01 00:56:02 UTC
  • Revision ID: git-v1:5dea5e01daaaff0685016f23b5cb46240f28e792
[klibc] Reorganize the standalone klibc tree to match the in-kernel tree

Right now, it's harder than it should to apply and test patches using
the standalone klibc tree.  Reorganize the standalone tree to match
the in-kernel tree.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>

Show diffs side-by-side

added added

removed removed

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