Rename VFS_BASE to FS_BASE

The recipients of these requests are file systems, not VFS.

Change-Id: I49211cfe4289df25b0c07171c7f8c321fc3731d6
This commit is contained in:
David van Moolenbroek 2013-11-02 16:39:03 +01:00 committed by Lionel Sambuc
parent 87c599da2d
commit d8106f7f1d
9 changed files with 55 additions and 55 deletions

View file

@ -801,7 +801,7 @@
* Messages used from VFS to file servers *
*===========================================================================*/
#define VFS_BASE 0xA00 /* Requests sent by VFS to filesystem
#define FS_BASE 0xA00 /* Requests sent by VFS to filesystem
* implementations. See <minix/vfsif.h>
*/

View file

@ -95,43 +95,43 @@ typedef u16_t pmode_t; /* Protocol version of mode_t */
typedef u32_t pino_t; /* Protocol version of ino_t */
/* Request numbers */
#define REQ_GETNODE (VFS_BASE + 1) /* Should be removed */
#define REQ_PUTNODE (VFS_BASE + 2)
#define REQ_SLINK (VFS_BASE + 3)
#define REQ_FTRUNC (VFS_BASE + 4)
#define REQ_CHOWN (VFS_BASE + 5)
#define REQ_CHMOD (VFS_BASE + 6)
#define REQ_INHIBREAD (VFS_BASE + 7)
#define REQ_STAT (VFS_BASE + 8)
#define REQ_UTIME (VFS_BASE + 9)
#define REQ_STATVFS (VFS_BASE + 10)
#define REQ_BREAD (VFS_BASE + 11)
#define REQ_BWRITE (VFS_BASE + 12)
#define REQ_UNLINK (VFS_BASE + 13)
#define REQ_RMDIR (VFS_BASE + 14)
#define REQ_UNMOUNT (VFS_BASE + 15)
#define REQ_SYNC (VFS_BASE + 16)
#define REQ_NEW_DRIVER (VFS_BASE + 17)
#define REQ_FLUSH (VFS_BASE + 18)
#define REQ_READ (VFS_BASE + 19)
#define REQ_WRITE (VFS_BASE + 20)
#define REQ_MKNOD (VFS_BASE + 21)
#define REQ_MKDIR (VFS_BASE + 22)
#define REQ_CREATE (VFS_BASE + 23)
#define REQ_LINK (VFS_BASE + 24)
#define REQ_RENAME (VFS_BASE + 25)
#define REQ_LOOKUP (VFS_BASE + 26)
#define REQ_MOUNTPOINT (VFS_BASE + 27)
#define REQ_READSUPER (VFS_BASE + 28)
#define REQ_NEWNODE (VFS_BASE + 29)
#define REQ_RDLINK (VFS_BASE + 30)
#define REQ_GETDENTS (VFS_BASE + 31)
#define REQ_PEEK (VFS_BASE + 32)
#define REQ_BPEEK (VFS_BASE + 33)
#define REQ_GETNODE (FS_BASE + 1) /* Should be removed */
#define REQ_PUTNODE (FS_BASE + 2)
#define REQ_SLINK (FS_BASE + 3)
#define REQ_FTRUNC (FS_BASE + 4)
#define REQ_CHOWN (FS_BASE + 5)
#define REQ_CHMOD (FS_BASE + 6)
#define REQ_INHIBREAD (FS_BASE + 7)
#define REQ_STAT (FS_BASE + 8)
#define REQ_UTIME (FS_BASE + 9)
#define REQ_STATVFS (FS_BASE + 10)
#define REQ_BREAD (FS_BASE + 11)
#define REQ_BWRITE (FS_BASE + 12)
#define REQ_UNLINK (FS_BASE + 13)
#define REQ_RMDIR (FS_BASE + 14)
#define REQ_UNMOUNT (FS_BASE + 15)
#define REQ_SYNC (FS_BASE + 16)
#define REQ_NEW_DRIVER (FS_BASE + 17)
#define REQ_FLUSH (FS_BASE + 18)
#define REQ_READ (FS_BASE + 19)
#define REQ_WRITE (FS_BASE + 20)
#define REQ_MKNOD (FS_BASE + 21)
#define REQ_MKDIR (FS_BASE + 22)
#define REQ_CREATE (FS_BASE + 23)
#define REQ_LINK (FS_BASE + 24)
#define REQ_RENAME (FS_BASE + 25)
#define REQ_LOOKUP (FS_BASE + 26)
#define REQ_MOUNTPOINT (FS_BASE + 27)
#define REQ_READSUPER (FS_BASE + 28)
#define REQ_NEWNODE (FS_BASE + 29)
#define REQ_RDLINK (FS_BASE + 30)
#define REQ_GETDENTS (FS_BASE + 31)
#define REQ_PEEK (FS_BASE + 32)
#define REQ_BPEEK (FS_BASE + 33)
#define NREQS 34
#define IS_VFS_RQ(type) (((type) & ~0xff) == VFS_BASE)
#define IS_FS_RQ(type) (((type) & ~0xff) == FS_BASE)
#define TRNS_GET_ID(t) ((t) & 0xFFFF)
#define TRNS_ADD_ID(t,id) (((t) << 16) | ((id) & 0xFFFF))

View file

@ -425,11 +425,11 @@ puffs_mount(struct puffs_usermount *pu, const char *dir, int mntflags,
caller_gid = INVAL_GID;
req_nr = fs_m_in.m_type;
if (req_nr < VFS_BASE) {
fs_m_in.m_type += VFS_BASE;
if (req_nr < FS_BASE) {
fs_m_in.m_type += FS_BASE;
req_nr = fs_m_in.m_type;
}
ind = req_nr - VFS_BASE;
ind = req_nr - FS_BASE;
assert(ind == REQ_READ_SUPER);
@ -601,11 +601,11 @@ puffs__theloop(struct puffs_cc *pcc)
caller_gid = INVAL_GID;
req_nr = fs_m_in.m_type;
if (req_nr < VFS_BASE) {
fs_m_in.m_type += VFS_BASE;
if (req_nr < FS_BASE) {
fs_m_in.m_type += FS_BASE;
req_nr = fs_m_in.m_type;
}
ind = req_nr - VFS_BASE;
ind = req_nr - FS_BASE;
if (ind < 0 || ind >= NREQS) {
error = EINVAL;

View file

@ -135,7 +135,7 @@ void sffs_loop(void)
}
if (state.s_mounted || call_nr == REQ_READSUPER) {
call_nr -= VFS_BASE;
call_nr -= FS_BASE;
dprintf(("%s: call %d\n", sffs_name, call_nr));

View file

@ -91,7 +91,7 @@ void start_vtreefs(struct fs_hooks *hooks, unsigned int nr_inodes,
}
if (fs_mounted || call_nr == REQ_READSUPER) {
call_nr -= VFS_BASE;
call_nr -= FS_BASE;
if (call_nr >= 0 && call_nr < NREQS) {
err = (*fs_call_vec[call_nr])();

View file

@ -76,11 +76,11 @@ int main(int argc, char *argv[])
caller_gid = INVAL_GID;
req_nr = fs_m_in.m_type;
if (req_nr < VFS_BASE) {
fs_m_in.m_type += VFS_BASE;
if (req_nr < FS_BASE) {
fs_m_in.m_type += FS_BASE;
req_nr = fs_m_in.m_type;
}
ind = req_nr - VFS_BASE;
ind = req_nr - FS_BASE;
if (ind < 0 || ind >= NREQS) {
printf("mfs: bad request %d\n", req_nr);

View file

@ -53,12 +53,12 @@ int main(void) {
req_nr = fs_m_in.m_type;
if (req_nr < VFS_BASE) {
fs_m_in.m_type += VFS_BASE;
if (req_nr < FS_BASE) {
fs_m_in.m_type += FS_BASE;
req_nr = fs_m_in.m_type;
}
ind = req_nr-VFS_BASE;
ind = req_nr-FS_BASE;
if (ind < 0 || ind >= NREQS) {
error = EINVAL;

View file

@ -55,11 +55,11 @@ int main(int argc, char *argv[])
caller_gid = INVAL_GID;
req_nr = fs_m_in.m_type;
if (req_nr < VFS_BASE) {
fs_m_in.m_type += VFS_BASE;
if (req_nr < FS_BASE) {
fs_m_in.m_type += FS_BASE;
req_nr = fs_m_in.m_type;
}
ind = req_nr - VFS_BASE;
ind = req_nr - FS_BASE;
if (ind < 0 || ind >= NREQS) {
printf("MFS: bad request %d from %d\n", req_nr, src);

View file

@ -52,8 +52,8 @@ int main(int argc, char *argv[])
src = pfs_m_in.m_source;
req_nr = pfs_m_in.m_type;
if (IS_VFS_RQ(req_nr)) {
ind = req_nr - VFS_BASE;
if (IS_FS_RQ(req_nr)) {
ind = req_nr - FS_BASE;
if (ind < 0 || ind >= FS_CALL_VEC_SIZE) {
printf("pfs: bad FS request %d\n", req_nr);
pfs_m_out.m_type = EINVAL;
@ -66,7 +66,7 @@ int main(int argc, char *argv[])
pfs_m_out.m_type = EINVAL;
}
if (IS_VFS_RQ(req_nr) && IS_VFS_FS_TRANSID(transid)) {
if (IS_FS_RQ(req_nr) && IS_VFS_FS_TRANSID(transid)) {
pfs_m_out.m_type = TRNS_ADD_ID(pfs_m_out.m_type, transid);
}
reply(src, &pfs_m_out);