From d8106f7f1d021452f5b36a18ad9c00174daa691d Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Sat, 2 Nov 2013 16:39:03 +0100 Subject: [PATCH] Rename VFS_BASE to FS_BASE The recipients of these requests are file systems, not VFS. Change-Id: I49211cfe4289df25b0c07171c7f8c321fc3731d6 --- include/minix/com.h | 2 +- include/minix/vfsif.h | 68 ++++++++++++++++++++-------------------- lib/libpuffs/puffs.c | 12 +++---- lib/libsffs/main.c | 2 +- lib/libvtreefs/vtreefs.c | 2 +- servers/ext2/main.c | 6 ++-- servers/iso9660fs/main.c | 6 ++-- servers/mfs/main.c | 6 ++-- servers/pfs/main.c | 6 ++-- 9 files changed, 55 insertions(+), 55 deletions(-) diff --git a/include/minix/com.h b/include/minix/com.h index 8c5c1ad0b..12a404908 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -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 */ diff --git a/include/minix/vfsif.h b/include/minix/vfsif.h index 1854a5cc7..7e2f0aead 100644 --- a/include/minix/vfsif.h +++ b/include/minix/vfsif.h @@ -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)) diff --git a/lib/libpuffs/puffs.c b/lib/libpuffs/puffs.c index be991cb52..ff07483e5 100644 --- a/lib/libpuffs/puffs.c +++ b/lib/libpuffs/puffs.c @@ -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; diff --git a/lib/libsffs/main.c b/lib/libsffs/main.c index b45b7847e..9ee468c74 100644 --- a/lib/libsffs/main.c +++ b/lib/libsffs/main.c @@ -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)); diff --git a/lib/libvtreefs/vtreefs.c b/lib/libvtreefs/vtreefs.c index 1c69e0868..4176dea44 100644 --- a/lib/libvtreefs/vtreefs.c +++ b/lib/libvtreefs/vtreefs.c @@ -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])(); diff --git a/servers/ext2/main.c b/servers/ext2/main.c index 7b0c715ac..0941c134f 100644 --- a/servers/ext2/main.c +++ b/servers/ext2/main.c @@ -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); diff --git a/servers/iso9660fs/main.c b/servers/iso9660fs/main.c index 5e85dff56..234487d13 100644 --- a/servers/iso9660fs/main.c +++ b/servers/iso9660fs/main.c @@ -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; diff --git a/servers/mfs/main.c b/servers/mfs/main.c index 0d0e0d74c..187bcca53 100644 --- a/servers/mfs/main.c +++ b/servers/mfs/main.c @@ -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); diff --git a/servers/pfs/main.c b/servers/pfs/main.c index b291e8819..860a1a049 100644 --- a/servers/pfs/main.c +++ b/servers/pfs/main.c @@ -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);