From 4c10a31440329dda85ab8d343059e1cee4a356e0 Mon Sep 17 00:00:00 2001 From: Arun Thomas Date: Tue, 8 Jun 2010 13:58:01 +0000 Subject: [PATCH] Remove legacy MM, FS, and FS_PROC_NR macros --- commands/ps/ps.c | 4 ++-- drivers/sb16/mixer/sb16_mixer.c | 2 +- include/lib.h | 2 -- include/minix/com.h | 3 +-- kernel/system/do_safecopy.c | 4 ++-- kernel/table.c | 2 +- lib/libc/other/__pm_findproc.c | 2 +- lib/libc/other/_adddma.c | 2 +- lib/libc/other/_brk.c | 2 +- lib/libc/other/_cprofile.c | 2 +- lib/libc/other/_deldma.c | 2 +- lib/libc/other/_getdents.c | 2 +- lib/libc/other/_getdma.c | 2 +- lib/libc/other/_getngid.c | 2 +- lib/libc/other/_getnpid.c | 2 +- lib/libc/other/_getnuid.c | 2 +- lib/libc/other/_lseek64.c | 2 +- lib/libc/other/_mapdriver.c | 2 +- lib/libc/other/_mcontext.c | 4 ++-- lib/libc/other/_mount.c | 4 ++-- lib/libc/other/_reboot.c | 2 +- lib/libc/other/_setgroups.c | 2 +- lib/libc/other/_sprofile.c | 2 +- lib/libc/other/_svrctl.c | 4 ++-- lib/libc/other/_sysuname.c | 2 +- lib/libc/other/mstats.c | 2 +- lib/libc/posix/__exit.c | 2 +- lib/libc/posix/_access.c | 2 +- lib/libc/posix/_alarm.c | 2 +- lib/libc/posix/_chdir.c | 4 ++-- lib/libc/posix/_chmod.c | 2 +- lib/libc/posix/_chown.c | 2 +- lib/libc/posix/_chroot.c | 2 +- lib/libc/posix/_close.c | 2 +- lib/libc/posix/_creat.c | 2 +- lib/libc/posix/_execve.c | 2 +- lib/libc/posix/_fchmod.c | 2 +- lib/libc/posix/_fchown.c | 2 +- lib/libc/posix/_fcntl.c | 2 +- lib/libc/posix/_fork.c | 2 +- lib/libc/posix/_fstat.c | 2 +- lib/libc/posix/_fstatfs.c | 2 +- lib/libc/posix/_fsync.c | 2 +- lib/libc/posix/_getegid.c | 2 +- lib/libc/posix/_geteuid.c | 2 +- lib/libc/posix/_getgid.c | 2 +- lib/libc/posix/_getgroups.c | 2 +- lib/libc/posix/_getpgrp.c | 2 +- lib/libc/posix/_getpid.c | 2 +- lib/libc/posix/_getppid.c | 2 +- lib/libc/posix/_getuid.c | 2 +- lib/libc/posix/_ioctl.c | 2 +- lib/libc/posix/_kill.c | 2 +- lib/libc/posix/_link.c | 2 +- lib/libc/posix/_lseek.c | 2 +- lib/libc/posix/_lstat.c | 2 +- lib/libc/posix/_mkdir.c | 2 +- lib/libc/posix/_mknod.c | 2 +- lib/libc/posix/_open.c | 2 +- lib/libc/posix/_pause.c | 2 +- lib/libc/posix/_pipe.c | 2 +- lib/libc/posix/_ptrace.c | 2 +- lib/libc/posix/_read.c | 2 +- lib/libc/posix/_readlink.c | 2 +- lib/libc/posix/_rename.c | 2 +- lib/libc/posix/_rmdir.c | 2 +- lib/libc/posix/_select.c | 2 +- lib/libc/posix/_setgid.c | 4 ++-- lib/libc/posix/_setsid.c | 2 +- lib/libc/posix/_setuid.c | 4 ++-- lib/libc/posix/_sigaction.c | 2 +- lib/libc/posix/_sigpending.c | 2 +- lib/libc/posix/_sigprocmask.c | 2 +- lib/libc/posix/_sigreturn.c | 2 +- lib/libc/posix/_sigsuspend.c | 2 +- lib/libc/posix/_stat.c | 2 +- lib/libc/posix/_stime.c | 2 +- lib/libc/posix/_symlink.c | 2 +- lib/libc/posix/_sync.c | 2 +- lib/libc/posix/_time.c | 2 +- lib/libc/posix/_times.c | 2 +- lib/libc/posix/_truncate.c | 4 ++-- lib/libc/posix/_umask.c | 2 +- lib/libc/posix/_unlink.c | 2 +- lib/libc/posix/_utime.c | 2 +- lib/libc/posix/_wait.c | 2 +- lib/libc/posix/_waitpid.c | 2 +- lib/libc/posix/_write.c | 2 +- lib/libc/posix/gettimeofday.c | 2 +- lib/libc/posix/priority.c | 4 ++-- servers/hgfs/main.c | 4 ++-- servers/inet/inet.c | 2 +- servers/is/dmp_fs.c | 4 ++-- servers/iso9660fs/main.c | 4 ++-- servers/iso9660fs/path.c | 2 +- servers/iso9660fs/read.c | 6 +++--- servers/mfs/link.c | 10 +++++----- servers/mfs/main.c | 2 +- servers/mfs/open.c | 10 +++++----- servers/mfs/path.c | 6 +++--- servers/mfs/read.c | 8 ++++---- servers/pfs/read.c | 4 ++-- servers/pm/exec.c | 2 +- servers/pm/forkexit.c | 2 +- servers/pm/main.c | 6 +++--- servers/pm/misc.c | 2 +- servers/pm/utility.c | 2 +- servers/rs/const.h | 2 +- servers/rs/manager.c | 2 +- servers/vfs/device.c | 6 +++--- servers/vfs/exec.c | 10 +++++----- servers/vfs/lock.c | 4 ++-- servers/vfs/main.c | 4 ++-- servers/vfs/utility.c | 2 +- 114 files changed, 152 insertions(+), 155 deletions(-) diff --git a/commands/ps/ps.c b/commands/ps/ps.c index 2c1fcb02a..cca101ada 100644 --- a/commands/ps/ps.c +++ b/commands/ps/ps.c @@ -240,7 +240,7 @@ PRIVATE char *prrecv(struct pstat *bufp) blkstr = "wait"; else if (bufp->ps_mflags & SIGSUSPENDED) blkstr = "sigsusp"; - } else if (bufp->ps_recv == FS_PROC_NR) { + } else if (bufp->ps_recv == VFS_PROC_NR) { switch(bufp->ps_blocked_on) { case FP_BLOCKED_ON_PIPE: blkstr = "pipe"; @@ -360,7 +360,7 @@ char *argv[]; } /* We need to know where INIT hangs out. */ - for (i = FS_PROC_NR; i < nr_procs; i++) { + for (i = VFS_PROC_NR; i < nr_procs; i++) { if (strcmp(ps_proc[nr_tasks + i].p_name, "init") == 0) break; } init_proc_nr = i; diff --git a/drivers/sb16/mixer/sb16_mixer.c b/drivers/sb16/mixer/sb16_mixer.c index e7583de61..d12024cff 100644 --- a/drivers/sb16/mixer/sb16_mixer.c +++ b/drivers/sb16/mixer/sb16_mixer.c @@ -67,7 +67,7 @@ PUBLIC void main() { switch (caller) { case HARDWARE: /* Leftover interrupt. */ continue; - case FS_PROC_NR: /* The only legitimate caller. */ + case VFS_PROC_NR: /* The only legitimate caller. */ break; default: dprint("sb16: got message from %d\n", caller); diff --git a/include/lib.h b/include/lib.h index 3bf79bced..d19736cb3 100644 --- a/include/lib.h +++ b/include/lib.h @@ -23,8 +23,6 @@ #include -#define MM PM_PROC_NR -#define FS FS_PROC_NR _PROTOTYPE( int __execve, (const char *_path, char *const _argv[], char *const _envp[], int _nargs, int _nenvps) ); diff --git a/include/minix/com.h b/include/minix/com.h index fcd295624..c0790cb99 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -64,8 +64,7 @@ /* User-space processes, that is, device drivers, servers, and INIT. */ #define PM_PROC_NR ((endpoint_t) 0) /* process manager */ -#define FS_PROC_NR ((endpoint_t) 1) /* file system */ -#define VFS_PROC_NR FS_PROC_NR /* FS has been renamed to VFS. */ +#define VFS_PROC_NR ((endpoint_t) 1) /* file system */ #define RS_PROC_NR ((endpoint_t) 2) /* reincarnation server */ #define MEM_PROC_NR ((endpoint_t) 3) /* memory driver (RAM disk, null, etc.) */ #define LOG_PROC_NR ((endpoint_t) 4) /* log device driver */ diff --git a/kernel/system/do_safecopy.c b/kernel/system/do_safecopy.c index d25329d92..752bc1cc4 100644 --- a/kernel/system/do_safecopy.c +++ b/kernel/system/do_safecopy.c @@ -181,10 +181,10 @@ endpoint_t *e_granter; /* new granter (magic grants) */ /* Currently, it is hardcoded that only FS may do * magic grants. */ - if(granter != FS_PROC_NR) { + if(granter != VFS_PROC_NR) { printf( "verify_grant: magic grant verify failed: granter (%d) " - "is not FS (%d)\n", granter, FS_PROC_NR); + "is not FS (%d)\n", granter, VFS_PROC_NR); return EPERM; } diff --git a/kernel/table.c b/kernel/table.c index f422a6da2..f1d19e9ca 100644 --- a/kernel/table.c +++ b/kernel/table.c @@ -76,7 +76,7 @@ PUBLIC struct boot_image image[] = { {PM_PROC_NR, 0,500, 4, 0, "pm" }, {SCHED_PROC_NR, 0,500, 4, 0, "sched" }, -{FS_PROC_NR, 0,500, 5, 0, "vfs" }, +{VFS_PROC_NR, 0,500, 5, 0, "vfs" }, {MEM_PROC_NR, BVM_F, 50, 3, 0, "memory"}, {LOG_PROC_NR, BVM_F, 50, 2, 0, "log" }, {TTY_PROC_NR, BVM_F, 50, 1, 0, "tty" }, diff --git a/lib/libc/other/__pm_findproc.c b/lib/libc/other/__pm_findproc.c index deaa26076..51b443521 100644 --- a/lib/libc/other/__pm_findproc.c +++ b/lib/libc/other/__pm_findproc.c @@ -12,7 +12,7 @@ int *proc_nr; /* return process number here */ m.m1_p1 = proc_name; m.m1_i1 = -1; /* search by name */ m.m1_i2 = strlen(proc_name) + 1; - if (_syscall(MM, GETPROCNR, &m) < 0) return(-1); + if (_syscall(PM_PROC_NR, GETPROCNR, &m) < 0) return(-1); *proc_nr = m.m1_i1; return(0); } diff --git a/lib/libc/other/_adddma.c b/lib/libc/other/_adddma.c index d77b29a00..651883e81 100644 --- a/lib/libc/other/_adddma.c +++ b/lib/libc/other/_adddma.c @@ -17,5 +17,5 @@ phys_bytes size; m.m2_l1= start; m.m2_l2= size; - return _syscall(MM, ADDDMA, &m); + return _syscall(PM_PROC_NR, ADDDMA, &m); } diff --git a/lib/libc/other/_brk.c b/lib/libc/other/_brk.c index c5df52c4f..266ba3771 100644 --- a/lib/libc/other/_brk.c +++ b/lib/libc/other/_brk.c @@ -21,7 +21,7 @@ char *addr; if (addr != _brksize) { m.PMBRK_ADDR = addr; - if (_syscall(MM, BRK, &m) < 0) return(-1); + if (_syscall(PM_PROC_NR, BRK, &m) < 0) return(-1); _brksize = m.m2_p1; } return(0); diff --git a/lib/libc/other/_cprofile.c b/lib/libc/other/_cprofile.c index 8d0f69e67..40aad033c 100644 --- a/lib/libc/other/_cprofile.c +++ b/lib/libc/other/_cprofile.c @@ -11,6 +11,6 @@ PUBLIC int cprofile(int action, int size, char *ctl_ptr, int *mem_ptr) m.PROF_CTL_PTR = (void *) ctl_ptr; m.PROF_MEM_PTR = (void *) mem_ptr; - return _syscall(MM, CPROF, &m); + return _syscall(PM_PROC_NR, CPROF, &m); } diff --git a/lib/libc/other/_deldma.c b/lib/libc/other/_deldma.c index 7ec5739c1..c5eceab86 100644 --- a/lib/libc/other/_deldma.c +++ b/lib/libc/other/_deldma.c @@ -17,5 +17,5 @@ phys_bytes size; m.m2_l1= start; m.m2_l2= size; - return _syscall(MM, DELDMA, &m); + return _syscall(PM_PROC_NR, DELDMA, &m); } diff --git a/lib/libc/other/_getdents.c b/lib/libc/other/_getdents.c index 698ec2b09..f5c22e9f5 100644 --- a/lib/libc/other/_getdents.c +++ b/lib/libc/other/_getdents.c @@ -12,5 +12,5 @@ size_t nbytes; m.m1_i1 = fd; m.m1_i2 = nbytes; m.m1_p1 = (char *) buffer; - return _syscall(FS, GETDENTS, &m); + return _syscall(VFS_PROC_NR, GETDENTS, &m); } diff --git a/lib/libc/other/_getdma.c b/lib/libc/other/_getdma.c index 1c6175d3b..b0302fe2c 100644 --- a/lib/libc/other/_getdma.c +++ b/lib/libc/other/_getdma.c @@ -14,7 +14,7 @@ phys_bytes *sizep; int r; message m; - r= _syscall(MM, GETDMA, &m); + r= _syscall(PM_PROC_NR, GETDMA, &m); if (r == 0) { *procp= m.m2_i1; diff --git a/lib/libc/other/_getngid.c b/lib/libc/other/_getngid.c index 22c114491..bf2e31316 100644 --- a/lib/libc/other/_getngid.c +++ b/lib/libc/other/_getngid.c @@ -6,6 +6,6 @@ PUBLIC gid_t getngid(endpoint_t proc_ep) { message m; m.m1_i1 = proc_ep; /* search gid for this process */ - if (_syscall(MM, GETEPINFO, &m) < 0) return ( (gid_t) -1); + if (_syscall(PM_PROC_NR, GETEPINFO, &m) < 0) return ( (gid_t) -1); return( (gid_t) m.m2_i2); /* return search result */ } diff --git a/lib/libc/other/_getnpid.c b/lib/libc/other/_getnpid.c index a04ee3c4b..3a1a98658 100644 --- a/lib/libc/other/_getnpid.c +++ b/lib/libc/other/_getnpid.c @@ -6,5 +6,5 @@ PUBLIC pid_t getnpid(endpoint_t proc_ep) { message m; m.m1_i1 = proc_ep; /* search pid for this process */ - return _syscall(MM, GETEPINFO, &m); + return _syscall(PM_PROC_NR, GETEPINFO, &m); } diff --git a/lib/libc/other/_getnuid.c b/lib/libc/other/_getnuid.c index 29202a86b..556ff6b26 100644 --- a/lib/libc/other/_getnuid.c +++ b/lib/libc/other/_getnuid.c @@ -6,6 +6,6 @@ PUBLIC uid_t getnuid(endpoint_t proc_ep) { message m; m.m1_i1 = proc_ep; /* search uid for this process */ - if (_syscall(MM, GETEPINFO, &m) < 0) return ( (uid_t) -1); + if (_syscall(PM_PROC_NR, GETEPINFO, &m) < 0) return ( (uid_t) -1); return( (uid_t) m.m2_i1); /* return search result */ } diff --git a/lib/libc/other/_lseek64.c b/lib/libc/other/_lseek64.c index 057877b12..f7c0a947d 100644 --- a/lib/libc/other/_lseek64.c +++ b/lib/libc/other/_lseek64.c @@ -15,7 +15,7 @@ u64_t *newpos; m.m2_l1 = ex64lo(offset); m.m2_l2 = ex64hi(offset); m.m2_i2 = whence; - if (_syscall(FS, LLSEEK, &m) < 0) return -1; + if (_syscall(VFS_PROC_NR, LLSEEK, &m) < 0) return -1; if (newpos) *newpos= make64(m.m2_l1, m.m2_l2); return 0; diff --git a/lib/libc/other/_mapdriver.c b/lib/libc/other/_mapdriver.c index 19ded8d29..fb08ce778 100644 --- a/lib/libc/other/_mapdriver.c +++ b/lib/libc/other/_mapdriver.c @@ -16,7 +16,7 @@ int flags; m.m2_i1 = major; m.m2_i2 = dev_style; m.m2_i3 = flags; - if (_syscall(FS, MAPDRIVER, &m) < 0) return(-1); + if (_syscall(VFS_PROC_NR, MAPDRIVER, &m) < 0) return(-1); return(0); } diff --git a/lib/libc/other/_mcontext.c b/lib/libc/other/_mcontext.c index e940d2c79..cedf8c22c 100644 --- a/lib/libc/other/_mcontext.c +++ b/lib/libc/other/_mcontext.c @@ -11,7 +11,7 @@ PUBLIC int setmcontext(const mcontext_t *mcp) m.m1_p1 = (char *) mcp; - return(_syscall(MM, SETMCONTEXT, &m)); + return(_syscall(PM_PROC_NR, SETMCONTEXT, &m)); } @@ -21,6 +21,6 @@ PUBLIC int getmcontext(mcontext_t *mcp) m.m1_p1 = (char *) mcp; - return(_syscall(MM, GETMCONTEXT, &m)); + return(_syscall(PM_PROC_NR, GETMCONTEXT, &m)); } diff --git a/lib/libc/other/_mount.c b/lib/libc/other/_mount.c index 597b71256..f846d6ec7 100644 --- a/lib/libc/other/_mount.c +++ b/lib/libc/other/_mount.c @@ -113,7 +113,7 @@ int mountflags; m.m1_p1 = special; m.m1_p2 = name; m.m1_p3 = label; - r = _syscall(FS, MOUNT, &m); + r = _syscall(VFS_PROC_NR, MOUNT, &m); if(r != OK) { /* If mount() failed, tell RS to shutdown MFS process. @@ -132,7 +132,7 @@ _CONST char *name; int r; _loadname(name, &m); - r = _syscall(FS, UMOUNT, &m); + r = _syscall(VFS_PROC_NR, UMOUNT, &m); if(r == OK) { /* VFS returns the label of the unmounted file system in the reply. diff --git a/lib/libc/other/_reboot.c b/lib/libc/other/_reboot.c index 8e87b6958..39273ba0b 100644 --- a/lib/libc/other/_reboot.c +++ b/lib/libc/other/_reboot.c @@ -20,5 +20,5 @@ int reboot(int how, ...) } va_end(ap); - return _syscall(MM, REBOOT, &m); + return _syscall(PM_PROC_NR, REBOOT, &m); } diff --git a/lib/libc/other/_setgroups.c b/lib/libc/other/_setgroups.c index eeb72053f..71548dc15 100644 --- a/lib/libc/other/_setgroups.c +++ b/lib/libc/other/_setgroups.c @@ -13,7 +13,7 @@ int setgroups(int ngroups, const gid_t *gidset) m.m1_p1 = (char *) gidset; m.m1_i1 = ngroups; - return(_syscall(MM, SETGROUPS, &m)); + return(_syscall(PM_PROC_NR, SETGROUPS, &m)); } diff --git a/lib/libc/other/_sprofile.c b/lib/libc/other/_sprofile.c index 7ae532a77..2c1bd632e 100644 --- a/lib/libc/other/_sprofile.c +++ b/lib/libc/other/_sprofile.c @@ -12,6 +12,6 @@ PUBLIC int sprofile(int action, int size, int freq, char *ctl_ptr, int *mem_ptr) m.PROF_CTL_PTR = (void *) ctl_ptr; m.PROF_MEM_PTR = (void *) mem_ptr; - return _syscall(MM, SPROF, &m); + return _syscall(PM_PROC_NR, SPROF, &m); } diff --git a/lib/libc/other/_svrctl.c b/lib/libc/other/_svrctl.c index 5836fefbe..e469741cc 100644 --- a/lib/libc/other/_svrctl.c +++ b/lib/libc/other/_svrctl.c @@ -17,11 +17,11 @@ int svrctl(int request, void *argp) case 'M': case 'S': /* MM handles calls for itself and the kernel. */ - return _syscall(MM, SVRCTL, &m); + return _syscall(PM_PROC_NR, SVRCTL, &m); case 'F': case 'I': /* FS handles calls for itself and inet. */ - return _syscall(FS, SVRCTL, &m); + return _syscall(VFS_PROC_NR, SVRCTL, &m); default: errno = EINVAL; return -1; diff --git a/lib/libc/other/_sysuname.c b/lib/libc/other/_sysuname.c index 461c36c35..04f85cdb3 100644 --- a/lib/libc/other/_sysuname.c +++ b/lib/libc/other/_sysuname.c @@ -18,7 +18,7 @@ int sysuname(int req, int field, char *value, size_t len) m.m1_p2 = NULL; m.m1_p3 = NULL; - return _syscall(MM, SYSUNAME, &m); + return _syscall(PM_PROC_NR, SYSUNAME, &m); } /* diff --git a/lib/libc/other/mstats.c b/lib/libc/other/mstats.c index da4a754f5..6bab41faa 100644 --- a/lib/libc/other/mstats.c +++ b/lib/libc/other/mstats.c @@ -13,7 +13,7 @@ PUBLIC int mstats(struct message_statentry *ms, int entries, int reset) m.m1_i2 = reset; m.m1_p1 = (void *) ms; - if(_syscall(MM, MSTATS, &m) < 0) { + if(_syscall(PM_PROC_NR, MSTATS, &m) < 0) { return -1; } diff --git a/lib/libc/posix/__exit.c b/lib/libc/posix/__exit.c index 2f9c8beeb..601d81572 100644 --- a/lib/libc/posix/__exit.c +++ b/lib/libc/posix/__exit.c @@ -9,7 +9,7 @@ int status; message m; m.m1_i1 = status; - _syscall(MM, EXIT, &m); + _syscall(PM_PROC_NR, EXIT, &m); /* If exiting nicely through PM fails for some reason, try to * commit suicide. E.g., message to PM might fail due to deadlock. diff --git a/lib/libc/posix/_access.c b/lib/libc/posix/_access.c index a39a4079a..7b43df5cf 100644 --- a/lib/libc/posix/_access.c +++ b/lib/libc/posix/_access.c @@ -10,5 +10,5 @@ int mode; m.m3_i2 = mode; _loadname(name, &m); - return(_syscall(FS, ACCESS, &m)); + return(_syscall(VFS_PROC_NR, ACCESS, &m)); } diff --git a/lib/libc/posix/_alarm.c b/lib/libc/posix/_alarm.c index a0cf3d9c6..3216692ca 100644 --- a/lib/libc/posix/_alarm.c +++ b/lib/libc/posix/_alarm.c @@ -8,5 +8,5 @@ unsigned int sec; message m; m.m1_i1 = (int) sec; - return( (unsigned) _syscall(MM, ALARM, &m)); + return( (unsigned) _syscall(PM_PROC_NR, ALARM, &m)); } diff --git a/lib/libc/posix/_chdir.c b/lib/libc/posix/_chdir.c index 1ead50669..e489a2a8a 100644 --- a/lib/libc/posix/_chdir.c +++ b/lib/libc/posix/_chdir.c @@ -9,7 +9,7 @@ _CONST char *name; message m; _loadname(name, &m); - return(_syscall(FS, CHDIR, &m)); + return(_syscall(VFS_PROC_NR, CHDIR, &m)); } PUBLIC int fchdir(fd) @@ -18,5 +18,5 @@ int fd; message m; m.m1_i1 = fd; - return(_syscall(FS, FCHDIR, &m)); + return(_syscall(VFS_PROC_NR, FCHDIR, &m)); } diff --git a/lib/libc/posix/_chmod.c b/lib/libc/posix/_chmod.c index fe5dd802b..95ac37f1a 100644 --- a/lib/libc/posix/_chmod.c +++ b/lib/libc/posix/_chmod.c @@ -8,5 +8,5 @@ PUBLIC int chmod(const char *name, mode_t mode) m.m3_i2 = mode; _loadname(name, &m); - return(_syscall(FS, CHMOD, &m)); + return(_syscall(VFS_PROC_NR, CHMOD, &m)); } diff --git a/lib/libc/posix/_chown.c b/lib/libc/posix/_chown.c index f5dc70fcd..703d55dcb 100644 --- a/lib/libc/posix/_chown.c +++ b/lib/libc/posix/_chown.c @@ -11,5 +11,5 @@ PUBLIC int chown(const char *name, uid_t owner, gid_t grp) m.m1_i2 = owner; m.m1_i3 = grp; m.m1_p1 = (char *) name; - return(_syscall(FS, CHOWN, &m)); + return(_syscall(VFS_PROC_NR, CHOWN, &m)); } diff --git a/lib/libc/posix/_chroot.c b/lib/libc/posix/_chroot.c index ca186966a..392a8574e 100644 --- a/lib/libc/posix/_chroot.c +++ b/lib/libc/posix/_chroot.c @@ -8,5 +8,5 @@ _CONST char *name; message m; _loadname(name, &m); - return(_syscall(FS, CHROOT, &m)); + return(_syscall(VFS_PROC_NR, CHROOT, &m)); } diff --git a/lib/libc/posix/_close.c b/lib/libc/posix/_close.c index be4f32390..8d09dcde3 100644 --- a/lib/libc/posix/_close.c +++ b/lib/libc/posix/_close.c @@ -8,5 +8,5 @@ int fd; message m; m.m1_i1 = fd; - return(_syscall(FS, CLOSE, &m)); + return(_syscall(VFS_PROC_NR, CLOSE, &m)); } diff --git a/lib/libc/posix/_creat.c b/lib/libc/posix/_creat.c index a862e8cfd..d3539e674 100644 --- a/lib/libc/posix/_creat.c +++ b/lib/libc/posix/_creat.c @@ -8,5 +8,5 @@ PUBLIC int creat(const char *name, mode_t mode) m.m3_i2 = mode; _loadname(name, &m); - return(_syscall(FS, CREAT, &m)); + return(_syscall(VFS_PROC_NR, CREAT, &m)); } diff --git a/lib/libc/posix/_execve.c b/lib/libc/posix/_execve.c index 4b2ec05ff..8306fe1b5 100644 --- a/lib/libc/posix/_execve.c +++ b/lib/libc/posix/_execve.c @@ -106,7 +106,7 @@ int execve(const char *path, char * const *argv, char * const *envp) m.m1_i3 = 0; m.m1_p3 = NULL; - (void) _syscall(MM, EXEC, &m); + (void) _syscall(PM_PROC_NR, EXEC, &m); /* Failure, return the memory used for the frame and exit. */ (void) sbrk(-frame_size); diff --git a/lib/libc/posix/_fchmod.c b/lib/libc/posix/_fchmod.c index 7841ee99a..8e66d5f2f 100644 --- a/lib/libc/posix/_fchmod.c +++ b/lib/libc/posix/_fchmod.c @@ -8,5 +8,5 @@ PUBLIC int fchmod(int fd, mode_t mode) m.m1_i1 = fd; m.m1_i2 = mode; - return(_syscall(FS, FCHMOD, &m)); + return(_syscall(VFS_PROC_NR, FCHMOD, &m)); } diff --git a/lib/libc/posix/_fchown.c b/lib/libc/posix/_fchown.c index 6d8603d41..b6f707aec 100644 --- a/lib/libc/posix/_fchown.c +++ b/lib/libc/posix/_fchown.c @@ -10,5 +10,5 @@ PUBLIC int fchown(int fd, uid_t owner, gid_t grp) m.m1_i1 = fd; m.m1_i2 = owner; m.m1_i3 = grp; - return(_syscall(FS, FCHOWN, &m)); + return(_syscall(VFS_PROC_NR, FCHOWN, &m)); } diff --git a/lib/libc/posix/_fcntl.c b/lib/libc/posix/_fcntl.c index 92e55d100..9ef65b5c3 100644 --- a/lib/libc/posix/_fcntl.c +++ b/lib/libc/posix/_fcntl.c @@ -41,5 +41,5 @@ int cmd; va_end(argp); m.m1_i1 = fd; m.m1_i2 = cmd; - return(_syscall(FS, FCNTL, &m)); + return(_syscall(VFS_PROC_NR, FCNTL, &m)); } diff --git a/lib/libc/posix/_fork.c b/lib/libc/posix/_fork.c index 54b565d33..63fe9fba1 100644 --- a/lib/libc/posix/_fork.c +++ b/lib/libc/posix/_fork.c @@ -6,5 +6,5 @@ PUBLIC pid_t fork() { message m; - return(_syscall(MM, FORK, &m)); + return(_syscall(PM_PROC_NR, FORK, &m)); } diff --git a/lib/libc/posix/_fstat.c b/lib/libc/posix/_fstat.c index 5143fbc1b..314dc075e 100644 --- a/lib/libc/posix/_fstat.c +++ b/lib/libc/posix/_fstat.c @@ -10,5 +10,5 @@ struct stat *buffer; m.m1_i1 = fd; m.m1_p1 = (char *) buffer; - return(_syscall(FS, FSTAT, &m)); + return(_syscall(VFS_PROC_NR, FSTAT, &m)); } diff --git a/lib/libc/posix/_fstatfs.c b/lib/libc/posix/_fstatfs.c index 7b0dd036a..725515501 100644 --- a/lib/libc/posix/_fstatfs.c +++ b/lib/libc/posix/_fstatfs.c @@ -9,5 +9,5 @@ PUBLIC int fstatfs(int fd, struct statfs *buffer) m.m1_i1 = fd; m.m1_p1 = (char *) buffer; - return(_syscall(FS, FSTATFS, &m)); + return(_syscall(VFS_PROC_NR, FSTATFS, &m)); } diff --git a/lib/libc/posix/_fsync.c b/lib/libc/posix/_fsync.c index 86ef0a5af..1f187cd0a 100644 --- a/lib/libc/posix/_fsync.c +++ b/lib/libc/posix/_fsync.c @@ -8,5 +8,5 @@ PUBLIC int fsync(int fd) m.m1_i1 = fd; - return(_syscall(FS, FSYNC, &m)); + return(_syscall(VFS_PROC_NR, FSYNC, &m)); } diff --git a/lib/libc/posix/_getegid.c b/lib/libc/posix/_getegid.c index dd1de6262..fc2c361c5 100644 --- a/lib/libc/posix/_getegid.c +++ b/lib/libc/posix/_getegid.c @@ -11,6 +11,6 @@ PUBLIC gid_t getegid() * are not always successful and Minix returns the unreserved value * (gid_t) -1 when there is an error. */ - if (_syscall(MM, GETGID, &m) < 0) return ( (gid_t) -1); + if (_syscall(PM_PROC_NR, GETGID, &m) < 0) return ( (gid_t) -1); return( (gid_t) m.m2_i1); } diff --git a/lib/libc/posix/_geteuid.c b/lib/libc/posix/_geteuid.c index 9e272f9b2..7ac0694a7 100644 --- a/lib/libc/posix/_geteuid.c +++ b/lib/libc/posix/_geteuid.c @@ -11,6 +11,6 @@ PUBLIC uid_t geteuid() * are not always successful and Minix returns the unreserved value * (uid_t) -1 when there is an error. */ - if (_syscall(MM, GETUID, &m) < 0) return ( (uid_t) -1); + if (_syscall(PM_PROC_NR, GETUID, &m) < 0) return ( (uid_t) -1); return( (uid_t) m.m2_i1); } diff --git a/lib/libc/posix/_getgid.c b/lib/libc/posix/_getgid.c index 5a7174b73..1cd3a6bcc 100644 --- a/lib/libc/posix/_getgid.c +++ b/lib/libc/posix/_getgid.c @@ -6,5 +6,5 @@ PUBLIC gid_t getgid() { message m; - return( (gid_t) _syscall(MM, GETGID, &m)); + return( (gid_t) _syscall(PM_PROC_NR, GETGID, &m)); } diff --git a/lib/libc/posix/_getgroups.c b/lib/libc/posix/_getgroups.c index 7f8a6c330..27d2d6a53 100644 --- a/lib/libc/posix/_getgroups.c +++ b/lib/libc/posix/_getgroups.c @@ -12,6 +12,6 @@ PUBLIC int getgroups(int ngroups, gid_t *arr) m.m1_i1 = ngroups; m.m1_p1 = arr; - return(_syscall(MM, GETGROUPS, &m)); + return(_syscall(PM_PROC_NR, GETGROUPS, &m)); } diff --git a/lib/libc/posix/_getpgrp.c b/lib/libc/posix/_getpgrp.c index 26d7afab4..71dc8eb7e 100644 --- a/lib/libc/posix/_getpgrp.c +++ b/lib/libc/posix/_getpgrp.c @@ -6,5 +6,5 @@ PUBLIC pid_t getpgrp() { message m; - return(_syscall(MM, GETPGRP, &m)); + return(_syscall(PM_PROC_NR, GETPGRP, &m)); } diff --git a/lib/libc/posix/_getpid.c b/lib/libc/posix/_getpid.c index 7f6e0e4f4..1dfc150c1 100644 --- a/lib/libc/posix/_getpid.c +++ b/lib/libc/posix/_getpid.c @@ -6,5 +6,5 @@ PUBLIC pid_t getpid() { message m; - return(_syscall(MM, MINIX_GETPID, &m)); + return(_syscall(PM_PROC_NR, MINIX_GETPID, &m)); } diff --git a/lib/libc/posix/_getppid.c b/lib/libc/posix/_getppid.c index a2a0f618e..5335bd67e 100644 --- a/lib/libc/posix/_getppid.c +++ b/lib/libc/posix/_getppid.c @@ -11,6 +11,6 @@ PUBLIC pid_t getppid() * are not always successful and Minix returns the reserved value * (pid_t) -1 when there is an error. */ - if (_syscall(MM, MINIX_GETPID, &m) < 0) return ( (pid_t) -1); + if (_syscall(PM_PROC_NR, MINIX_GETPID, &m) < 0) return ( (pid_t) -1); return( (pid_t) m.m2_i1); } diff --git a/lib/libc/posix/_getuid.c b/lib/libc/posix/_getuid.c index 93c996056..1ee2886f8 100644 --- a/lib/libc/posix/_getuid.c +++ b/lib/libc/posix/_getuid.c @@ -6,5 +6,5 @@ PUBLIC uid_t getuid() { message m; - return( (uid_t) _syscall(MM, GETUID, &m)); + return( (uid_t) _syscall(PM_PROC_NR, GETUID, &m)); } diff --git a/lib/libc/posix/_ioctl.c b/lib/libc/posix/_ioctl.c index b1f5a26f8..4ceb74006 100644 --- a/lib/libc/posix/_ioctl.c +++ b/lib/libc/posix/_ioctl.c @@ -13,5 +13,5 @@ void *data; m.TTY_LINE = fd; m.TTY_REQUEST = request; m.ADDRESS = (char *) data; - return(_syscall(FS, IOCTL, &m)); + return(_syscall(VFS_PROC_NR, IOCTL, &m)); } diff --git a/lib/libc/posix/_kill.c b/lib/libc/posix/_kill.c index abc44a0df..80250a195 100644 --- a/lib/libc/posix/_kill.c +++ b/lib/libc/posix/_kill.c @@ -10,5 +10,5 @@ int sig; /* signal number */ m.m1_i1 = proc; m.m1_i2 = sig; - return(_syscall(MM, KILL, &m)); + return(_syscall(PM_PROC_NR, KILL, &m)); } diff --git a/lib/libc/posix/_link.c b/lib/libc/posix/_link.c index 0789cc631..0973434fb 100644 --- a/lib/libc/posix/_link.c +++ b/lib/libc/posix/_link.c @@ -12,5 +12,5 @@ _CONST char *name, *name2; m.m1_i2 = strlen(name2) + 1; m.m1_p1 = (char *) name; m.m1_p2 = (char *) name2; - return(_syscall(FS, LINK, &m)); + return(_syscall(VFS_PROC_NR, LINK, &m)); } diff --git a/lib/libc/posix/_lseek.c b/lib/libc/posix/_lseek.c index f152fad0d..574bba9a2 100644 --- a/lib/libc/posix/_lseek.c +++ b/lib/libc/posix/_lseek.c @@ -12,6 +12,6 @@ int whence; m.m2_i1 = fd; m.m2_l1 = offset; m.m2_i2 = whence; - if (_syscall(FS, LSEEK, &m) < 0) return( (off_t) -1); + if (_syscall(VFS_PROC_NR, LSEEK, &m) < 0) return( (off_t) -1); return( (off_t) m.m2_l1); } diff --git a/lib/libc/posix/_lstat.c b/lib/libc/posix/_lstat.c index 64e24f057..4ad6ceb23 100644 --- a/lib/libc/posix/_lstat.c +++ b/lib/libc/posix/_lstat.c @@ -14,7 +14,7 @@ struct stat *buffer; m.m1_i1 = strlen(name) + 1; m.m1_p1 = (char *) name; m.m1_p2 = (char *) buffer; - if((r = _syscall(FS, LSTAT, &m)) >= 0 || errno != ENOSYS) + if((r = _syscall(VFS_PROC_NR, LSTAT, &m)) >= 0 || errno != ENOSYS) return r; return _stat(name, buffer); } diff --git a/lib/libc/posix/_mkdir.c b/lib/libc/posix/_mkdir.c index 8b9db7364..fb43239c1 100644 --- a/lib/libc/posix/_mkdir.c +++ b/lib/libc/posix/_mkdir.c @@ -10,5 +10,5 @@ PUBLIC int mkdir(const char *name, mode_t mode) m.m1_i1 = strlen(name) + 1; m.m1_i2 = mode; m.m1_p1 = (char *) name; - return(_syscall(FS, MKDIR, &m)); + return(_syscall(VFS_PROC_NR, MKDIR, &m)); } diff --git a/lib/libc/posix/_mknod.c b/lib/libc/posix/_mknod.c index a6c266523..b65ac18d8 100644 --- a/lib/libc/posix/_mknod.c +++ b/lib/libc/posix/_mknod.c @@ -13,5 +13,5 @@ PUBLIC int mknod(const char *name, mode_t mode, dev_t dev) m.m1_i3 = dev; m.m1_p1 = (char *) name; m.m1_p2 = (char *) ((int) 0); /* obsolete size field */ - return(_syscall(FS, MKNOD, &m)); + return(_syscall(VFS_PROC_NR, MKNOD, &m)); } diff --git a/lib/libc/posix/_open.c b/lib/libc/posix/_open.c index 39ba74f06..f0d2fe9f8 100644 --- a/lib/libc/posix/_open.c +++ b/lib/libc/posix/_open.c @@ -27,5 +27,5 @@ PUBLIC int open(const char *name, int flags) m.m3_i2 = flags; } va_end(argp); - return (_syscall(FS, OPEN, &m)); + return (_syscall(VFS_PROC_NR, OPEN, &m)); } diff --git a/lib/libc/posix/_pause.c b/lib/libc/posix/_pause.c index c8a388f0d..7e0b2a2ea 100644 --- a/lib/libc/posix/_pause.c +++ b/lib/libc/posix/_pause.c @@ -6,5 +6,5 @@ PUBLIC int pause() { message m; - return(_syscall(MM, PAUSE, &m)); + return(_syscall(PM_PROC_NR, PAUSE, &m)); } diff --git a/lib/libc/posix/_pipe.c b/lib/libc/posix/_pipe.c index f59e89cf4..918fb197c 100644 --- a/lib/libc/posix/_pipe.c +++ b/lib/libc/posix/_pipe.c @@ -7,7 +7,7 @@ int fild[2]; { message m; - if (_syscall(FS, PIPE, &m) < 0) return(-1); + if (_syscall(VFS_PROC_NR, PIPE, &m) < 0) return(-1); fild[0] = m.m1_i1; fild[1] = m.m1_i2; return(0); diff --git a/lib/libc/posix/_ptrace.c b/lib/libc/posix/_ptrace.c index c33059eef..7c57fb3b7 100644 --- a/lib/libc/posix/_ptrace.c +++ b/lib/libc/posix/_ptrace.c @@ -10,7 +10,7 @@ PUBLIC long ptrace(int req, pid_t pid, long addr, long data) m.m2_i2 = req; m.PMTRACE_ADDR = addr; m.m2_l2 = data; - if (_syscall(MM, PTRACE, &m) < 0) return(-1); + if (_syscall(PM_PROC_NR, PTRACE, &m) < 0) return(-1); /* There was no error, but -1 is a legal return value. Clear errno if * necessary to distinguish this case. _syscall has set errno to nonzero diff --git a/lib/libc/posix/_read.c b/lib/libc/posix/_read.c index ac4ceb0f6..8138c000d 100644 --- a/lib/libc/posix/_read.c +++ b/lib/libc/posix/_read.c @@ -12,5 +12,5 @@ size_t nbytes; m.m1_i1 = fd; m.m1_i2 = nbytes; m.m1_p1 = (char *) buffer; - return(_syscall(FS, READ, &m)); + return(_syscall(VFS_PROC_NR, READ, &m)); } diff --git a/lib/libc/posix/_readlink.c b/lib/libc/posix/_readlink.c index f1ce536e1..2148d2fd2 100644 --- a/lib/libc/posix/_readlink.c +++ b/lib/libc/posix/_readlink.c @@ -15,5 +15,5 @@ size_t bufsiz; m.m1_p1 = (char *) name; m.m1_p2 = (char *) buffer; - return(_syscall(FS, RDLNK, &m)); + return(_syscall(VFS_PROC_NR, RDLNK, &m)); } diff --git a/lib/libc/posix/_rename.c b/lib/libc/posix/_rename.c index a0d85b963..755627eb1 100644 --- a/lib/libc/posix/_rename.c +++ b/lib/libc/posix/_rename.c @@ -12,5 +12,5 @@ _CONST char *name, *name2; m.m1_i2 = strlen(name2) + 1; m.m1_p1 = (char *) name; m.m1_p2 = (char *) name2; - return(_syscall(FS, RENAME, &m)); + return(_syscall(VFS_PROC_NR, RENAME, &m)); } diff --git a/lib/libc/posix/_rmdir.c b/lib/libc/posix/_rmdir.c index 720110e70..6e338795f 100644 --- a/lib/libc/posix/_rmdir.c +++ b/lib/libc/posix/_rmdir.c @@ -8,5 +8,5 @@ _CONST char *name; message m; _loadname(name, &m); - return(_syscall(FS, RMDIR, &m)); + return(_syscall(VFS_PROC_NR, RMDIR, &m)); } diff --git a/lib/libc/posix/_select.c b/lib/libc/posix/_select.c index 9aeebca2c..810fbb17a 100644 --- a/lib/libc/posix/_select.c +++ b/lib/libc/posix/_select.c @@ -17,6 +17,6 @@ PUBLIC int select(int nfds, m.SEL_ERRORFDS = (char *) errorfds; m.SEL_TIMEOUT = (char *) timeout; - return (_syscall(FS, SELECT, &m)); + return (_syscall(VFS_PROC_NR, SELECT, &m)); } diff --git a/lib/libc/posix/_setgid.c b/lib/libc/posix/_setgid.c index 693cf1bcb..9e9f97d41 100644 --- a/lib/libc/posix/_setgid.c +++ b/lib/libc/posix/_setgid.c @@ -8,7 +8,7 @@ PUBLIC int setgid(gid_t grp) message m; m.m1_i1 = (int) grp; - return(_syscall(MM, SETGID, &m)); + return(_syscall(PM_PROC_NR, SETGID, &m)); } PUBLIC int setegid(gid_t grp) @@ -16,5 +16,5 @@ PUBLIC int setegid(gid_t grp) message m; m.m1_i1 = (int) grp; - return(_syscall(MM, SETEGID, &m)); + return(_syscall(PM_PROC_NR, SETEGID, &m)); } diff --git a/lib/libc/posix/_setsid.c b/lib/libc/posix/_setsid.c index 9e9127381..df3b7ec8d 100644 --- a/lib/libc/posix/_setsid.c +++ b/lib/libc/posix/_setsid.c @@ -6,5 +6,5 @@ PUBLIC pid_t setsid() { message m; - return(_syscall(MM, SETSID, &m)); + return(_syscall(PM_PROC_NR, SETSID, &m)); } diff --git a/lib/libc/posix/_setuid.c b/lib/libc/posix/_setuid.c index 8da6c589e..4d85a6d7b 100644 --- a/lib/libc/posix/_setuid.c +++ b/lib/libc/posix/_setuid.c @@ -8,7 +8,7 @@ PUBLIC int setuid(uid_t usr) message m; m.m1_i1 = usr; - return(_syscall(MM, SETUID, &m)); + return(_syscall(PM_PROC_NR, SETUID, &m)); } PUBLIC int seteuid(uid_t usr) @@ -16,5 +16,5 @@ PUBLIC int seteuid(uid_t usr) message m; m.m1_i1 = usr; - return(_syscall(MM, SETEUID, &m)); + return(_syscall(PM_PROC_NR, SETEUID, &m)); } diff --git a/lib/libc/posix/_sigaction.c b/lib/libc/posix/_sigaction.c index bbd19b182..0ba020ce1 100644 --- a/lib/libc/posix/_sigaction.c +++ b/lib/libc/posix/_sigaction.c @@ -18,5 +18,5 @@ struct sigaction *oact; m.m1_p2 = (char *) oact; m.m1_p3 = (char *) __sigreturn; - return(_syscall(MM, SIGACTION, &m)); + return(_syscall(PM_PROC_NR, SIGACTION, &m)); } diff --git a/lib/libc/posix/_sigpending.c b/lib/libc/posix/_sigpending.c index e214058e2..95760f36c 100644 --- a/lib/libc/posix/_sigpending.c +++ b/lib/libc/posix/_sigpending.c @@ -7,7 +7,7 @@ sigset_t *set; { message m; - if (_syscall(MM, SIGPENDING, &m) < 0) return(-1); + if (_syscall(PM_PROC_NR, SIGPENDING, &m) < 0) return(-1); *set = (sigset_t) m.m2_l1; return(m.m_type); } diff --git a/lib/libc/posix/_sigprocmask.c b/lib/libc/posix/_sigprocmask.c index cd25cd80a..51c25f120 100644 --- a/lib/libc/posix/_sigprocmask.c +++ b/lib/libc/posix/_sigprocmask.c @@ -16,7 +16,7 @@ sigset_t *oset; m.m2_i1 = how; m.m2_l1 = (long) *set; } - if (_syscall(MM, SIGPROCMASK, &m) < 0) return(-1); + if (_syscall(PM_PROC_NR, SIGPROCMASK, &m) < 0) return(-1); if (oset != (sigset_t *) NULL) *oset = (sigset_t) (m.m2_l1); return(m.m_type); } diff --git a/lib/libc/posix/_sigreturn.c b/lib/libc/posix/_sigreturn.c index 5514728bb..a9024f276 100644 --- a/lib/libc/posix/_sigreturn.c +++ b/lib/libc/posix/_sigreturn.c @@ -24,5 +24,5 @@ register struct sigcontext *scp; m.m2_l1 = scp->sc_mask; m.m2_i2 = scp->sc_flags; m.m2_p1 = (char *) scp; - return(_syscall(MM, SIGRETURN, &m)); /* normally this doesn't return */ + return(_syscall(PM_PROC_NR, SIGRETURN, &m)); /* normally this doesn't return */ } diff --git a/lib/libc/posix/_sigsuspend.c b/lib/libc/posix/_sigsuspend.c index 01649a37f..84ddf477e 100644 --- a/lib/libc/posix/_sigsuspend.c +++ b/lib/libc/posix/_sigsuspend.c @@ -8,5 +8,5 @@ _CONST sigset_t *set; message m; m.m2_l1 = (long) *set; - return(_syscall(MM, SIGSUSPEND, &m)); + return(_syscall(PM_PROC_NR, SIGSUSPEND, &m)); } diff --git a/lib/libc/posix/_stat.c b/lib/libc/posix/_stat.c index ce907fb33..ddbf3d12f 100644 --- a/lib/libc/posix/_stat.c +++ b/lib/libc/posix/_stat.c @@ -12,5 +12,5 @@ struct stat *buffer; m.m1_i1 = strlen(name) + 1; m.m1_p1 = (char *) name; m.m1_p2 = (char *) buffer; - return(_syscall(FS, STAT, &m)); + return(_syscall(VFS_PROC_NR, STAT, &m)); } diff --git a/lib/libc/posix/_stime.c b/lib/libc/posix/_stime.c index abcdc02e5..8a53b630e 100644 --- a/lib/libc/posix/_stime.c +++ b/lib/libc/posix/_stime.c @@ -8,5 +8,5 @@ long *top; message m; m.m2_l1 = *top; - return(_syscall(MM, STIME, &m)); + return(_syscall(PM_PROC_NR, STIME, &m)); } diff --git a/lib/libc/posix/_symlink.c b/lib/libc/posix/_symlink.c index 9398ca918..5046f51c7 100644 --- a/lib/libc/posix/_symlink.c +++ b/lib/libc/posix/_symlink.c @@ -12,5 +12,5 @@ _CONST char *name, *name2; m.m1_i2 = strlen(name2) + 1; m.m1_p1 = (char *) name; m.m1_p2 = (char *) name2; - return(_syscall(FS, SYMLINK, &m)); + return(_syscall(VFS_PROC_NR, SYMLINK, &m)); } diff --git a/lib/libc/posix/_sync.c b/lib/libc/posix/_sync.c index 2d803a4b4..536504bd0 100644 --- a/lib/libc/posix/_sync.c +++ b/lib/libc/posix/_sync.c @@ -6,5 +6,5 @@ PUBLIC int sync() { message m; - return(_syscall(FS, SYNC, &m)); + return(_syscall(VFS_PROC_NR, SYNC, &m)); } diff --git a/lib/libc/posix/_time.c b/lib/libc/posix/_time.c index 9a0d8beaa..6a576ca74 100644 --- a/lib/libc/posix/_time.c +++ b/lib/libc/posix/_time.c @@ -7,7 +7,7 @@ time_t *tp; { message m; - if (_syscall(MM, TIME, &m) < 0) return( (time_t) -1); + if (_syscall(PM_PROC_NR, TIME, &m) < 0) return( (time_t) -1); if (tp != (time_t *) 0) *tp = m.m2_l1; return(m.m2_l1); } diff --git a/lib/libc/posix/_times.c b/lib/libc/posix/_times.c index 4504e1208..bbf4cdc3d 100644 --- a/lib/libc/posix/_times.c +++ b/lib/libc/posix/_times.c @@ -8,7 +8,7 @@ struct tms *buf; message m; m.m4_l5 = 0; /* return this if system is pre-1.6 */ - if (_syscall(MM, TIMES, &m) < 0) return( (clock_t) -1); + if (_syscall(PM_PROC_NR, TIMES, &m) < 0) return( (clock_t) -1); buf->tms_utime = m.m4_l1; buf->tms_stime = m.m4_l2; buf->tms_cutime = m.m4_l3; diff --git a/lib/libc/posix/_truncate.c b/lib/libc/posix/_truncate.c index 7d2be517a..b3d49dd31 100644 --- a/lib/libc/posix/_truncate.c +++ b/lib/libc/posix/_truncate.c @@ -11,7 +11,7 @@ PUBLIC int truncate(const char *_path, off_t _length) m.m2_i1 = strlen(_path)+1; m.m2_l1 = _length; - return(_syscall(FS, TRUNCATE, &m)); + return(_syscall(VFS_PROC_NR, TRUNCATE, &m)); } PUBLIC int ftruncate(int _fd, off_t _length) @@ -20,5 +20,5 @@ PUBLIC int ftruncate(int _fd, off_t _length) m.m2_l1 = _length; m.m2_i1 = _fd; - return(_syscall(FS, FTRUNCATE, &m)); + return(_syscall(VFS_PROC_NR, FTRUNCATE, &m)); } diff --git a/lib/libc/posix/_umask.c b/lib/libc/posix/_umask.c index 170cca193..fbe56c225 100644 --- a/lib/libc/posix/_umask.c +++ b/lib/libc/posix/_umask.c @@ -7,5 +7,5 @@ PUBLIC mode_t umask(mode_t complmode) message m; m.m1_i1 = complmode; - return( (mode_t) _syscall(FS, UMASK, &m)); + return( (mode_t) _syscall(VFS_PROC_NR, UMASK, &m)); } diff --git a/lib/libc/posix/_unlink.c b/lib/libc/posix/_unlink.c index e3ddc074f..a44b6d79f 100644 --- a/lib/libc/posix/_unlink.c +++ b/lib/libc/posix/_unlink.c @@ -8,5 +8,5 @@ _CONST char *name; message m; _loadname(name, &m); - return(_syscall(FS, UNLINK, &m)); + return(_syscall(VFS_PROC_NR, UNLINK, &m)); } diff --git a/lib/libc/posix/_utime.c b/lib/libc/posix/_utime.c index f28f640f2..c9ad8bfd3 100644 --- a/lib/libc/posix/_utime.c +++ b/lib/libc/posix/_utime.c @@ -20,5 +20,5 @@ _CONST struct utimbuf *timp; m.m2_i1 = strlen(name) + 1; } m.m2_p1 = (char *) name; - return(_syscall(FS, UTIME, &m)); + return(_syscall(VFS_PROC_NR, UTIME, &m)); } diff --git a/lib/libc/posix/_wait.c b/lib/libc/posix/_wait.c index f8d59f806..9e5764d2d 100644 --- a/lib/libc/posix/_wait.c +++ b/lib/libc/posix/_wait.c @@ -7,7 +7,7 @@ int *status; { message m; - if (_syscall(MM, WAIT, &m) < 0) return(-1); + if (_syscall(PM_PROC_NR, WAIT, &m) < 0) return(-1); if (status != 0) *status = m.m2_i1; return(m.m_type); } diff --git a/lib/libc/posix/_waitpid.c b/lib/libc/posix/_waitpid.c index ddab2b090..9f2e55b76 100644 --- a/lib/libc/posix/_waitpid.c +++ b/lib/libc/posix/_waitpid.c @@ -11,7 +11,7 @@ int options; m.m1_i1 = pid; m.m1_i2 = options; - if (_syscall(MM, WAITPID, &m) < 0) return(-1); + if (_syscall(PM_PROC_NR, WAITPID, &m) < 0) return(-1); if (status != 0) *status = m.m2_i1; return m.m_type; } diff --git a/lib/libc/posix/_write.c b/lib/libc/posix/_write.c index 39e96c05f..0330d7bf5 100644 --- a/lib/libc/posix/_write.c +++ b/lib/libc/posix/_write.c @@ -12,5 +12,5 @@ size_t nbytes; m.m1_i1 = fd; m.m1_i2 = nbytes; m.m1_p1 = (char *) buffer; - return(_syscall(FS, WRITE, &m)); + return(_syscall(VFS_PROC_NR, WRITE, &m)); } diff --git a/lib/libc/posix/gettimeofday.c b/lib/libc/posix/gettimeofday.c index 4089c8938..35a7943c7 100644 --- a/lib/libc/posix/gettimeofday.c +++ b/lib/libc/posix/gettimeofday.c @@ -9,7 +9,7 @@ int gettimeofday(struct timeval *_RESTRICT tp, void *_RESTRICT tzp) { message m; - if (_syscall(MM, GETTIMEOFDAY, &m) < 0) + if (_syscall(PM_PROC_NR, GETTIMEOFDAY, &m) < 0) return -1; tp->tv_sec = m.m2_l1; diff --git a/lib/libc/posix/priority.c b/lib/libc/posix/priority.c index 29c68c9b0..6f908805e 100644 --- a/lib/libc/posix/priority.c +++ b/lib/libc/posix/priority.c @@ -26,7 +26,7 @@ int getpriority(int which, int who) * to see if something really went wrong.) */ - if((v = _syscall(MM, GETPRIORITY, &m)) < 0) { + if((v = _syscall(PM_PROC_NR, GETPRIORITY, &m)) < 0) { return v; } @@ -41,6 +41,6 @@ int setpriority(int which, int who, int prio) m.m1_i2 = who; m.m1_i3 = prio; - return _syscall(MM, SETPRIORITY, &m); + return _syscall(PM_PROC_NR, SETPRIORITY, &m); } diff --git a/servers/hgfs/main.c b/servers/hgfs/main.c index 794a60874..963dd471c 100644 --- a/servers/hgfs/main.c +++ b/servers/hgfs/main.c @@ -78,7 +78,7 @@ sef_init_info_t *info; /* Announce our presence to VFS. */ m.m_type = FS_READY; - if ((r = send(FS_PROC_NR, &m)) != OK) { + if ((r = send(VFS_PROC_NR, &m)) != OK) { printf("HGFS: unable to login to VFS (%d)\n", r); return r; @@ -144,7 +144,7 @@ char *argv[]; for (;;) { call_nr = get_work(&who_e); - if (who_e != FS_PROC_NR) { + if (who_e != VFS_PROC_NR) { continue; } diff --git a/servers/inet/inet.c b/servers/inet/inet.c index 3e11a4956..66ac49d9c 100644 --- a/servers/inet/inet.c +++ b/servers/inet/inet.c @@ -138,7 +138,7 @@ PUBLIC void main() reset_time(); source= mq->mq_mess.m_source; m_type= mq->mq_mess.m_type; - if (source == FS_PROC_NR) + if (source == VFS_PROC_NR) { sr_rec(mq); } diff --git a/servers/is/dmp_fs.c b/servers/is/dmp_fs.c index 630af6709..b721ba19f 100644 --- a/servers/is/dmp_fs.c +++ b/servers/is/dmp_fs.c @@ -27,7 +27,7 @@ PUBLIC void fproc_dmp() int i, n=0; static int prev_i; - getsysinfo(FS_PROC_NR, SI_PROC_TAB, fproc); + getsysinfo(VFS_PROC_NR, SI_PROC_TAB, fproc); printf("File System (FS) process table dump\n"); printf("-nr- -pid- -tty- -umask- --uid-- --gid-- -ldr- -sus-rev-proc-\n"); @@ -89,7 +89,7 @@ PUBLIC void dtab_dmp() { int i; - getsysinfo(FS_PROC_NR, SI_DMAP_TAB, dmap); + getsysinfo(VFS_PROC_NR, SI_DMAP_TAB, dmap); printf("File System (FS) device <-> driver mappings\n"); printf(" Label Major Driver ept Flags Style \n"); diff --git a/servers/iso9660fs/main.c b/servers/iso9660fs/main.c index 3438771d4..529765700 100644 --- a/servers/iso9660fs/main.c +++ b/servers/iso9660fs/main.c @@ -36,7 +36,7 @@ PUBLIC int main(void) { who_e = fs_m_in.m_source; /* source of the request */ - if (who_e != FS_PROC_NR) { /* If the message is not for us just + if (who_e != VFS_PROC_NR) { /* If the message is not for us just * continue */ continue; } @@ -97,7 +97,7 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info) fs_m_in.m_type = FS_READY; - if ((r = send(FS_PROC_NR, &fs_m_in)) != OK) { + if ((r = send(VFS_PROC_NR, &fs_m_in)) != OK) { panic("Error sending login to VFS: %d", r); } diff --git a/servers/iso9660fs/path.c b/servers/iso9660fs/path.c index d28868d18..e01d9732f 100644 --- a/servers/iso9660fs/path.c +++ b/servers/iso9660fs/path.c @@ -34,7 +34,7 @@ PUBLIC int fs_lookup() { if(len < 1) return(EINVAL); /* too small */ /* Copy the pathname and set up caller's user and group id */ - r = sys_safecopyfrom(FS_PROC_NR, grant, 0, (vir_bytes) user_path, + r = sys_safecopyfrom(VFS_PROC_NR, grant, 0, (vir_bytes) user_path, (phys_bytes) len, D); if (r != OK) { printf("ISOFS %s:%d sys_safecopyfrom failed: %d\n", diff --git a/servers/iso9660fs/read.c b/servers/iso9660fs/read.c index aa3b5dc7b..89156face 100644 --- a/servers/iso9660fs/read.c +++ b/servers/iso9660fs/read.c @@ -224,7 +224,7 @@ PUBLIC int fs_getdents(void) { /* If the new record does not fit, then copy the buffer * and start from the beginning. */ if (tmpbuf_offset + reclen > GETDENTS_BUFSIZ) { - r = sys_safecopyto(FS_PROC_NR, gid, userbuf_off, + r = sys_safecopyto(VFS_PROC_NR, gid, userbuf_off, (vir_bytes)getdents_buf, tmpbuf_offset, D); if (r != OK) @@ -258,7 +258,7 @@ PUBLIC int fs_getdents(void) { } if (tmpbuf_offset != 0) { - r = sys_safecopyto(FS_PROC_NR, gid, userbuf_off, + r = sys_safecopyto(VFS_PROC_NR, gid, userbuf_off, (vir_bytes) getdents_buf, tmpbuf_offset, D); if (r != OK) panic("fs_getdents: sys_safecopyto failed: %d", r); @@ -322,7 +322,7 @@ int *completed; /* number of bytes copied */ panic("bp not valid in rw_chunk; this can't happen"); } - r = sys_safecopyto(FS_PROC_NR, gid, buf_off, + r = sys_safecopyto(VFS_PROC_NR, gid, buf_off, (vir_bytes) (bp->b_data+off), (phys_bytes) chunk, D); put_block(bp); diff --git a/servers/mfs/link.c b/servers/mfs/link.c index d067ee9ad..07ac263fe 100644 --- a/servers/mfs/link.c +++ b/servers/mfs/link.c @@ -42,7 +42,7 @@ PUBLIC int fs_link() len = min( (unsigned) fs_m_in.REQ_PATH_LEN, sizeof(string)); /* Copy the link name's last component */ - r = sys_safecopyfrom(FS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, + r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, (vir_bytes) 0, (vir_bytes) string, (size_t) len, D); if (r != OK) return r; NUL(string, len, sizeof(string)); @@ -116,7 +116,7 @@ PUBLIC int fs_unlink() /* Copy the last component */ len = min( (unsigned) fs_m_in.REQ_PATH_LEN, sizeof(string)); - r = sys_safecopyfrom(FS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, + r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, (vir_bytes) 0, (vir_bytes) string, (size_t) len, D); if (r != OK) return r; NUL(string, len, sizeof(string)); @@ -186,7 +186,7 @@ PUBLIC int fs_rdlink() below max file size */ copylen = min( copylen, (unsigned) rip->i_size); bp = get_block(rip->i_dev, b, NORMAL); - r = sys_safecopyto(FS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, + r = sys_safecopyto(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, (vir_bytes) 0, (vir_bytes) bp->b_data, (size_t) copylen, D); put_block(bp, DIRECTORY_BLOCK); @@ -289,14 +289,14 @@ PUBLIC int fs_rename() /* Copy the last component of the old name */ len = min( (unsigned) fs_m_in.REQ_REN_LEN_OLD, sizeof(old_name)); - r = sys_safecopyfrom(FS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_REN_GRANT_OLD, + r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_REN_GRANT_OLD, (vir_bytes) 0, (vir_bytes) old_name, (size_t) len, D); if (r != OK) return r; NUL(old_name, len, sizeof(old_name)); /* Copy the last component of the new name */ len = min( (unsigned) fs_m_in.REQ_REN_LEN_NEW, sizeof(new_name)); - r = sys_safecopyfrom(FS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_REN_GRANT_NEW, + r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_REN_GRANT_NEW, (vir_bytes) 0, (vir_bytes) new_name, (size_t) len, D); if (r != OK) return r; NUL(new_name, len, sizeof(new_name)); diff --git a/servers/mfs/main.c b/servers/mfs/main.c index d935c3167..1f8435679 100644 --- a/servers/mfs/main.c +++ b/servers/mfs/main.c @@ -119,7 +119,7 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info) fs_m_in.m_type = FS_READY; - if ((r = send(FS_PROC_NR, &fs_m_in)) != OK) { + if ((r = send(VFS_PROC_NR, &fs_m_in)) != OK) { panic("Error sending login to VFS: %d", r); } diff --git a/servers/mfs/open.c b/servers/mfs/open.c index 949c8715d..b45ec6f74 100644 --- a/servers/mfs/open.c +++ b/servers/mfs/open.c @@ -32,7 +32,7 @@ PUBLIC int fs_create() /* Copy the last component (i.e., file name) */ len = min( (unsigned) fs_m_in.REQ_PATH_LEN, sizeof(lastc)); - err_code = sys_safecopyfrom(FS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, + err_code = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, (vir_bytes) 0, (vir_bytes) lastc, (size_t) len, D); if (err_code != OK) return err_code; NUL(lastc, len, sizeof(lastc)); @@ -79,7 +79,7 @@ PUBLIC int fs_mknod() /* Copy the last component and set up caller's user and group id */ len = min( (unsigned) fs_m_in.REQ_PATH_LEN, sizeof(lastc)); - err_code = sys_safecopyfrom(FS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, + err_code = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, (vir_bytes) 0, (vir_bytes) lastc, (size_t) len, D); if (err_code != OK) return err_code; NUL(lastc, len, sizeof(lastc)); @@ -114,7 +114,7 @@ PUBLIC int fs_mkdir() /* Copy the last component and set up caller's user and group id */ len = min( (unsigned) fs_m_in.REQ_PATH_LEN, sizeof(lastc)); - err_code = sys_safecopyfrom(FS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, + err_code = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, (vir_bytes) 0, (vir_bytes) lastc, (size_t) len, D); if(err_code != OK) return(err_code); NUL(lastc, len, sizeof(lastc)); @@ -184,7 +184,7 @@ PUBLIC int fs_slink() /* Copy the link name's last component */ len = min( (unsigned) fs_m_in.REQ_PATH_LEN, sizeof(string)); - r = sys_safecopyfrom(FS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, + r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT, (vir_bytes) 0, (vir_bytes) string, (size_t) len, D); if (r != OK) return(r); NUL(string, len, sizeof(string)); @@ -204,7 +204,7 @@ PUBLIC int fs_slink() if (bp == NULL) r = err_code; else - r = sys_safecopyfrom(FS_PROC_NR, + r = sys_safecopyfrom(VFS_PROC_NR, (cp_grant_id_t) fs_m_in.REQ_GRANT3, (vir_bytes) 0, (vir_bytes) bp->b_data, (size_t) fs_m_in.REQ_MEM_SIZE, D); diff --git a/servers/mfs/path.c b/servers/mfs/path.c index 8bce2afe6..8d32dd641 100644 --- a/servers/mfs/path.c +++ b/servers/mfs/path.c @@ -55,7 +55,7 @@ PUBLIC int fs_lookup() if(len == 0) return(EINVAL); /* too small */ /* Copy the pathname and set up caller's user and group id */ - r = sys_safecopyfrom(FS_PROC_NR, grant, /*offset*/ (vir_bytes) 0, + r = sys_safecopyfrom(VFS_PROC_NR, grant, /*offset*/ (vir_bytes) 0, (vir_bytes) user_path, (size_t) len, D); if(r != OK) return(r); @@ -67,7 +67,7 @@ PUBLIC int fs_lookup() cred_size = (size_t) fs_m_in.REQ_UCRED_SIZE; if (cred_size > sizeof(credentials)) return(EINVAL); /* Too big. */ - r = sys_safecopyfrom(FS_PROC_NR, grant2, (vir_bytes) 0, + r = sys_safecopyfrom(VFS_PROC_NR, grant2, (vir_bytes) 0, (vir_bytes) &credentials, cred_size, D); if (r != OK) return(r); @@ -87,7 +87,7 @@ PUBLIC int fs_lookup() len = strlen(user_path)+1; if(len > path_size) return(ENAMETOOLONG); - r1 = sys_safecopyto(FS_PROC_NR, grant, (vir_bytes) 0, + r1 = sys_safecopyto(VFS_PROC_NR, grant, (vir_bytes) 0, (vir_bytes) user_path, (size_t) len, D); if(r1 != OK) return(r1); } diff --git a/servers/mfs/read.c b/servers/mfs/read.c index 690a32eb2..900502f2a 100644 --- a/servers/mfs/read.c +++ b/servers/mfs/read.c @@ -269,11 +269,11 @@ int *completed; /* number of bytes copied */ if (rw_flag == READING) { /* Copy a chunk from the block buffer to user space. */ - r = sys_safecopyto(FS_PROC_NR, gid, (vir_bytes) buf_off, + r = sys_safecopyto(VFS_PROC_NR, gid, (vir_bytes) buf_off, (vir_bytes) (bp->b_data+off), (size_t) chunk, D); } else { /* Copy a chunk from user space to the block buffer. */ - r = sys_safecopyfrom(FS_PROC_NR, gid, (vir_bytes) buf_off, + r = sys_safecopyfrom(VFS_PROC_NR, gid, (vir_bytes) buf_off, (vir_bytes) (bp->b_data+off), (size_t) chunk, D); bp->b_dirt = DIRTY; } @@ -618,7 +618,7 @@ PUBLIC int fs_getdents(void) ent_pos = block_pos + ((char *) dp - (bp->b_data)); if(tmpbuf_off + reclen > GETDENTS_BUFSIZ) { - r = sys_safecopyto(FS_PROC_NR, gid, + r = sys_safecopyto(VFS_PROC_NR, gid, (vir_bytes) userbuf_off, (vir_bytes) getdents_buf, (size_t) tmpbuf_off, D); @@ -658,7 +658,7 @@ PUBLIC int fs_getdents(void) } if(tmpbuf_off != 0) { - r = sys_safecopyto(FS_PROC_NR, gid, (vir_bytes) userbuf_off, + r = sys_safecopyto(VFS_PROC_NR, gid, (vir_bytes) userbuf_off, (vir_bytes) getdents_buf, (size_t) tmpbuf_off, D); if (r != OK) { put_inode(rip); diff --git a/servers/pfs/read.c b/servers/pfs/read.c index 00f99eaa9..be3c19b2a 100644 --- a/servers/pfs/read.c +++ b/servers/pfs/read.c @@ -51,11 +51,11 @@ PUBLIC int fs_readwrite(void) if (rw_flag == READING) { /* Copy a chunk from the block buffer to user space. */ - r = sys_safecopyto(FS_PROC_NR, gid, (vir_bytes) 0, + r = sys_safecopyto(VFS_PROC_NR, gid, (vir_bytes) 0, (vir_bytes) (bp->b_data+position), (size_t) nrbytes, D); } else { /* Copy a chunk from user space to the block buffer. */ - r = sys_safecopyfrom(FS_PROC_NR, gid, (vir_bytes) 0, + r = sys_safecopyfrom(VFS_PROC_NR, gid, (vir_bytes) 0, (vir_bytes) (bp->b_data+position), (size_t) nrbytes, D); } diff --git a/servers/pm/exec.c b/servers/pm/exec.c index 3f74e7921..f30d7212d 100644 --- a/servers/pm/exec.c +++ b/servers/pm/exec.c @@ -67,7 +67,7 @@ PUBLIC int do_exec_newmem() int r, flags; char *stack_top; - if (who_e != FS_PROC_NR && who_e != RS_PROC_NR) + if (who_e != VFS_PROC_NR && who_e != RS_PROC_NR) return EPERM; proc_e= m_in.EXC_NM_PROC; diff --git a/servers/pm/forkexit.c b/servers/pm/forkexit.c index a7900800f..879d94823 100644 --- a/servers/pm/forkexit.c +++ b/servers/pm/forkexit.c @@ -294,7 +294,7 @@ int dump_core; /* flag indicating whether to dump core */ printf("PM: INIT died\n"); return; } - if (proc_nr_e == FS_PROC_NR) + if (proc_nr_e == VFS_PROC_NR) { panic("exit_proc: FS died: %d", r); } diff --git a/servers/pm/main.c b/servers/pm/main.c index f37f5df93..9c936584b 100644 --- a/servers/pm/main.c +++ b/servers/pm/main.c @@ -120,7 +120,7 @@ PUBLIC int main() case PM_UNPAUSE_REPLY: case PM_REBOOT_REPLY: case PM_SETGROUPS_REPLY: - if (who_e == FS_PROC_NR) + if (who_e == VFS_PROC_NR) { handle_fs_reply(); result= SUSPEND; /* don't reply */ @@ -275,14 +275,14 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info) mess.PM_SLOT = ip->proc_nr; mess.PM_PID = rmp->mp_pid; mess.PM_PROC = rmp->mp_endpoint; - if (OK != (s=send(FS_PROC_NR, &mess))) + if (OK != (s=send(VFS_PROC_NR, &mess))) panic("can't sync up with FS: %d", s); } } /* Tell FS that no more system processes follow and synchronize. */ mess.PR_ENDPT = NONE; - if (sendrec(FS_PROC_NR, &mess) != OK || mess.m_type != OK) + if (sendrec(VFS_PROC_NR, &mess) != OK || mess.m_type != OK) panic("can't sync up with FS"); #if (CHIP == INTEL) diff --git a/servers/pm/misc.c b/servers/pm/misc.c index 984200148..1534f1ef0 100644 --- a/servers/pm/misc.c +++ b/servers/pm/misc.c @@ -396,7 +396,7 @@ PUBLIC int do_reboot() /* Tell FS to reboot */ m.m_type = PM_REBOOT; - tell_fs(&mproc[FS_PROC_NR], &m); + tell_fs(&mproc[VFS_PROC_NR], &m); return(SUSPEND); /* don't reply to caller */ } diff --git a/servers/pm/utility.c b/servers/pm/utility.c index 33e489e29..98c499ffd 100644 --- a/servers/pm/utility.c +++ b/servers/pm/utility.c @@ -131,7 +131,7 @@ message *m_ptr; if (rmp->mp_flags & FS_CALL) panic("tell_fs: not idle: %d", m_ptr->m_type); - r = asynsend3(FS_PROC_NR, m_ptr, AMF_NOREPLY); + r = asynsend3(VFS_PROC_NR, m_ptr, AMF_NOREPLY); if (r != OK) panic("unable to send to FS: %d", r); diff --git a/servers/rs/const.h b/servers/rs/const.h index e021a3e8b..3832e6881 100644 --- a/servers/rs/const.h +++ b/servers/rs/const.h @@ -75,7 +75,7 @@ /* Send masks determine to whom processes can send messages or notifications. */ #define SRV_M (~0) /* system services */ #define RUSR_M \ - ( spi_to(PM_PROC_NR) | spi_to(FS_PROC_NR) | spi_to(RS_PROC_NR) \ + ( spi_to(PM_PROC_NR) | spi_to(VFS_PROC_NR) | spi_to(RS_PROC_NR) \ | spi_to(VM_PROC_NR) ) /* root user proc */ /* Define the signal manager for the various process types. */ diff --git a/servers/rs/manager.c b/servers/rs/manager.c index c3a6f8236..f37a7c31b 100644 --- a/servers/rs/manager.c +++ b/servers/rs/manager.c @@ -1735,7 +1735,7 @@ struct priv *privp; else if (strcmp(label, "PM") == 0) endpoint= PM_PROC_NR; else if (strcmp(label, "VFS") == 0) - endpoint= FS_PROC_NR; + endpoint= VFS_PROC_NR; else if (strcmp(label, "RS") == 0) endpoint= RS_PROC_NR; else if (strcmp(label, "LOG") == 0) diff --git a/servers/vfs/device.c b/servers/vfs/device.c index 598e13e12..49f8ee715 100644 --- a/servers/vfs/device.c +++ b/servers/vfs/device.c @@ -169,7 +169,7 @@ PUBLIC void dev_status(message *m) switch(st.m_type) { case DEV_REVIVE: endpt = st.REP_ENDPT; - if(endpt == FS_PROC_NR) { + if(endpt == VFS_PROC_NR) { endpt = suspended_ep(m->m_source, st.REP_IO_GRANT); if(endpt == NONE) { @@ -298,7 +298,7 @@ u32_t *pos_lo; * endpoint becomes FS if it wasn't already. */ if(GRANT_VALID(*gid)) { - *io_ept = FS_PROC_NR; + *io_ept = VFS_PROC_NR; return 1; } @@ -850,7 +850,7 @@ PUBLIC void dev_up(int maj) if ( ((vmp->m_dev >> MAJOR) & BYTE) != maj) continue; minor = ((vmp->m_dev >> MINOR) & BYTE); - if ((r = dev_open(vmp->m_dev, FS_PROC_NR, + if ((r = dev_open(vmp->m_dev, VFS_PROC_NR, vmp->m_flags ? R_BIT : (R_BIT|W_BIT))) != OK) { printf("VFS: mounted dev %d/%d re-open failed: %d.\n", maj, minor, r); diff --git a/servers/vfs/exec.c b/servers/vfs/exec.c index 708d0bcb7..4b146c5a3 100644 --- a/servers/vfs/exec.c +++ b/servers/vfs/exec.c @@ -121,7 +121,7 @@ vir_bytes frame_len; else if ((r1 = forbidden(vp, X_BIT)) != OK) r = r1; else - r = req_stat(vp->v_fs_e, vp->v_inode_nr, FS_PROC_NR, + r = req_stat(vp->v_fs_e, vp->v_inode_nr, VFS_PROC_NR, (char *) &sb, 0); if (r != OK) { put_vnode(vp); @@ -302,7 +302,7 @@ PRIVATE int read_header( /* Issue request */ r = req_readwrite(vp->v_fs_e, vp->v_inode_nr, cvul64(pos), READING, - FS_PROC_NR, (char*)&hdr, sizeof(hdr), &new_pos, &cum_io); + VFS_PROC_NR, (char*)&hdr, sizeof(hdr), &new_pos, &cum_io); if (r != OK) return r; /* Interpreted script? */ @@ -369,7 +369,7 @@ vir_bytes *stk_bytes; /* size of initial stack */ /* Issue request */ r = req_readwrite(vp->v_fs_e, vp->v_inode_nr, cvul64(pos), READING, - FS_PROC_NR, buf, _MAX_BLOCK_SIZE, &new_pos, &cum_io); + VFS_PROC_NR, buf, _MAX_BLOCK_SIZE, &new_pos, &cum_io); if (r != OK) return(r); n = vp->v_size; @@ -531,7 +531,7 @@ phys_bytes seg_bytes; /* how much is to be transferred? */ if (n > sizeof(buf)) n = sizeof(buf); - if ((r = req_readwrite(vp->v_fs_e,vp->v_inode_nr,cvul64(off+o), READING, FS_PROC_NR, buf, + if ((r = req_readwrite(vp->v_fs_e,vp->v_inode_nr,cvul64(off+o), READING, VFS_PROC_NR, buf, n, &new_pos, &cum_io)) != OK) { printf("VFS: read_seg: req_readwrite failed (text)\n"); return(r); @@ -543,7 +543,7 @@ phys_bytes seg_bytes; /* how much is to be transferred? */ return(EIO); } - if ((r = sys_vircopy(FS_PROC_NR, D, (vir_bytes)buf, proc_e, + if ((r = sys_vircopy(VFS_PROC_NR, D, (vir_bytes)buf, proc_e, seg, o, n)) != OK) { printf("VFS: read_seg: copy failed (text)\n"); return(r); diff --git a/servers/vfs/lock.c b/servers/vfs/lock.c index 25e42b6ba..340642f41 100644 --- a/servers/vfs/lock.c +++ b/servers/vfs/lock.c @@ -34,7 +34,7 @@ int req; /* either F_SETLK or F_SETLKW */ /* Fetch the flock structure from user space. */ user_flock = (vir_bytes) m_in.name1; - r = sys_datacopy(who_e, (vir_bytes) user_flock, FS_PROC_NR, + r = sys_datacopy(who_e, (vir_bytes) user_flock, VFS_PROC_NR, (vir_bytes) &flock, (phys_bytes) sizeof(flock)); if (r != OK) return(EINVAL); @@ -147,7 +147,7 @@ int req; /* either F_SETLK or F_SETLKW */ } /* Copy the flock structure back to the caller. */ - r = sys_datacopy(FS_PROC_NR, (vir_bytes) &flock, + r = sys_datacopy(VFS_PROC_NR, (vir_bytes) &flock, who_e, (vir_bytes) user_flock, (phys_bytes) sizeof(flock)); return(r); } diff --git a/servers/vfs/main.c b/servers/vfs/main.c index d2a62d436..f2323fea4 100644 --- a/servers/vfs/main.c +++ b/servers/vfs/main.c @@ -71,7 +71,7 @@ PUBLIC int main(void) endpoint_t endpt; endpt = m_in.REP_ENDPT; - if(endpt == FS_PROC_NR) { + if(endpt == VFS_PROC_NR) { endpt = suspended_ep(m_in.m_source, m_in.REP_IO_GRANT); if(endpt == NONE) { printf("FS: proc with " @@ -262,7 +262,7 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info) /* The following initializations are needed to let dev_opcl succeed .*/ fp = (struct fproc *) NULL; - who_e = who_p = FS_PROC_NR; + who_e = who_p = VFS_PROC_NR; /* Initialize device table. */ build_dmap(); diff --git a/servers/vfs/utility.c b/servers/vfs/utility.c index 02509c2b0..ff941f95f 100644 --- a/servers/vfs/utility.c +++ b/servers/vfs/utility.c @@ -60,7 +60,7 @@ int flag; /* M3 means path may be in message */ } else { /* String is not contained in the message. Get it from user space. */ r = sys_datacopy(who_e, (vir_bytes) path, - FS_PROC_NR, (vir_bytes) user_fullpath, (phys_bytes) len); + VFS_PROC_NR, (vir_bytes) user_fullpath, (phys_bytes) len); } if (user_fullpath[len - 1] != '\0') { -- 2.44.0