1 #ifndef __MINIX_VFSIF_H
2 #define __MINIX_VFSIF_H
7 /* VFS/FS request fields */
8 #define REQ_ACTIME m9_l2
9 #define REQ_ACNSEC m9_l4
10 #define REQ_COUNT m9_l2
11 #define REQ_DEV m9_ull1
12 #define REQ_DIR_INO m9_l3
13 #define REQ_FLAGS m9_s3
15 #define REQ_GRANT m9_l2
16 #define REQ_GRANT2 m9_l1
17 #define REQ_GRANT3 m9_l3
18 #define REQ_INODE_NR m9_l1
19 #define REQ_MEM_SIZE m9_l5
20 #define REQ_MODE m9_s3
21 #define REQ_MODTIME m9_l3
22 #define REQ_MODNSEC m9_l5
23 #define REQ_NBYTES m9_l5
24 #define REQ_PATH_LEN m9_s2
25 #define REQ_PATH_SIZE m9_l5
26 #define REQ_REN_GRANT_NEW m9_l1
27 #define REQ_REN_GRANT_OLD m9_l2
28 #define REQ_REN_LEN_NEW m9_s2
29 #define REQ_REN_LEN_OLD m9_s1
30 #define REQ_REN_NEW_DIR m9_l4
31 #define REQ_REN_OLD_DIR m9_l3
32 #define REQ_ROOT_INO m9_l4
33 #define REQ_SEEK_POS m9_ull2
34 #define REQ_TRC_START m9_ull1
35 #define REQ_TRC_END m9_ull2
36 #define REQ_UCRED_SIZE m9_s4
39 /* VFS/FS reply fields */
40 #define RES_DEV m9_ull1
42 #define RES_INODE_NR m9_l1
43 #define RES_FILE_SIZE m9_ull2
44 #define RES_MODE m9_s2
45 #define RES_NBYTES m9_l5
46 #define RES_OFFSET m9_s2
47 #define RES_SEEK_POS m9_ull2
48 #define RES_SYMLOOP m9_s3
50 #define RES_FLAGS m9_s3
53 #define REQ_RDONLY 001 /* FS is mounted read-only */
54 #define REQ_ISROOT 002 /* FS is root file system */
56 #define PATH_NOFLAGS 000
57 #define PATH_RET_SYMLINK 010 /* Return a symlink object (i.e.
58 * do not continue with the contents
59 * of the symlink if it is the last
60 * component in a path). */
61 #define PATH_GET_UCRED 020 /* Request provides a grant ID in m9_l1
62 * and struct ucred size in m9_s4 (as
63 * opposed to a REQ_UID). */
65 #define RES_NOFLAGS 000
66 #define RES_THREADED 001 /* FS supports multithreading */
67 #define RES_HASPEEK 002 /* FS implements REQ_PEEK/REQ_BPEEK */
68 #define RES_64BIT 004 /* FS can handle 64-bit file sizes */
70 /* VFS/FS error messages */
71 #define EENTERMOUNT (-301)
72 #define ELEAVEMOUNT (-302)
73 #define ESYMLINK (-303)
77 /* User credential structure */
82 gid_t vu_sgroups
[NGROUPS_MAX
];
85 /* Some system types are larger than what the protocol and FSes use */
86 typedef u16_t puid_t
; /* Protocol version of uid_t */
87 typedef u16_t pgid_t
; /* Protocol version of gid_t */
88 typedef u16_t pmode_t
; /* Protocol version of mode_t */
89 typedef u32_t pino_t
; /* Protocol version of ino_t */
92 #define REQ_GETNODE (FS_BASE + 1) /* Should be removed */
93 #define REQ_PUTNODE (FS_BASE + 2)
94 #define REQ_SLINK (FS_BASE + 3)
95 #define REQ_FTRUNC (FS_BASE + 4)
96 #define REQ_CHOWN (FS_BASE + 5)
97 #define REQ_CHMOD (FS_BASE + 6)
98 #define REQ_INHIBREAD (FS_BASE + 7)
99 #define REQ_STAT (FS_BASE + 8)
100 #define REQ_UTIME (FS_BASE + 9)
101 #define REQ_STATVFS (FS_BASE + 10)
102 #define REQ_BREAD (FS_BASE + 11)
103 #define REQ_BWRITE (FS_BASE + 12)
104 #define REQ_UNLINK (FS_BASE + 13)
105 #define REQ_RMDIR (FS_BASE + 14)
106 #define REQ_UNMOUNT (FS_BASE + 15)
107 #define REQ_SYNC (FS_BASE + 16)
108 #define REQ_NEW_DRIVER (FS_BASE + 17)
109 #define REQ_FLUSH (FS_BASE + 18)
110 #define REQ_READ (FS_BASE + 19)
111 #define REQ_WRITE (FS_BASE + 20)
112 #define REQ_MKNOD (FS_BASE + 21)
113 #define REQ_MKDIR (FS_BASE + 22)
114 #define REQ_CREATE (FS_BASE + 23)
115 #define REQ_LINK (FS_BASE + 24)
116 #define REQ_RENAME (FS_BASE + 25)
117 #define REQ_LOOKUP (FS_BASE + 26)
118 #define REQ_MOUNTPOINT (FS_BASE + 27)
119 #define REQ_READSUPER (FS_BASE + 28)
120 #define REQ_NEWNODE (FS_BASE + 29)
121 #define REQ_RDLINK (FS_BASE + 30)
122 #define REQ_GETDENTS (FS_BASE + 31)
123 #define REQ_PEEK (FS_BASE + 32)
124 #define REQ_BPEEK (FS_BASE + 33)
128 #define IS_FS_RQ(type) (((type) & ~0xff) == FS_BASE)
130 #define TRNS_GET_ID(t) ((t) & 0xFFFF)
131 #define TRNS_ADD_ID(t,id) (((t) << 16) | ((id) & 0xFFFF))
132 #define TRNS_DEL_ID(t) ((short)((t) >> 16))