Remove legacy MM, FS, and FS_PROC_NR macros
This commit is contained in:
parent
7bd7946346
commit
4c10a31440
114 changed files with 152 additions and 155 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
#include <minix/ipc.h>
|
||||
|
||||
#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) );
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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" },
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -20,5 +20,5 @@ int reboot(int how, ...)
|
|||
}
|
||||
va_end(ap);
|
||||
|
||||
return _syscall(MM, REBOOT, &m);
|
||||
return _syscall(PM_PROC_NR, REBOOT, &m);
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ _CONST char *name;
|
|||
message m;
|
||||
|
||||
_loadname(name, &m);
|
||||
return(_syscall(FS, CHROOT, &m));
|
||||
return(_syscall(VFS_PROC_NR, CHROOT, &m));
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ int fd;
|
|||
message m;
|
||||
|
||||
m.m1_i1 = fd;
|
||||
return(_syscall(FS, CLOSE, &m));
|
||||
return(_syscall(VFS_PROC_NR, CLOSE, &m));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -6,5 +6,5 @@ PUBLIC pid_t fork()
|
|||
{
|
||||
message m;
|
||||
|
||||
return(_syscall(MM, FORK, &m));
|
||||
return(_syscall(PM_PROC_NR, FORK, &m));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -6,5 +6,5 @@ PUBLIC pid_t getpgrp()
|
|||
{
|
||||
message m;
|
||||
|
||||
return(_syscall(MM, GETPGRP, &m));
|
||||
return(_syscall(PM_PROC_NR, GETPGRP, &m));
|
||||
}
|
||||
|
|
|
@ -6,5 +6,5 @@ PUBLIC pid_t getpid()
|
|||
{
|
||||
message m;
|
||||
|
||||
return(_syscall(MM, MINIX_GETPID, &m));
|
||||
return(_syscall(PM_PROC_NR, MINIX_GETPID, &m));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -6,5 +6,5 @@ PUBLIC int pause()
|
|||
{
|
||||
message m;
|
||||
|
||||
return(_syscall(MM, PAUSE, &m));
|
||||
return(_syscall(PM_PROC_NR, PAUSE, &m));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ _CONST char *name;
|
|||
message m;
|
||||
|
||||
_loadname(name, &m);
|
||||
return(_syscall(FS, RMDIR, &m));
|
||||
return(_syscall(VFS_PROC_NR, RMDIR, &m));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -6,5 +6,5 @@ PUBLIC pid_t setsid()
|
|||
{
|
||||
message m;
|
||||
|
||||
return(_syscall(MM, SETSID, &m));
|
||||
return(_syscall(PM_PROC_NR, SETSID, &m));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ long *top;
|
|||
message m;
|
||||
|
||||
m.m2_l1 = *top;
|
||||
return(_syscall(MM, STIME, &m));
|
||||
return(_syscall(PM_PROC_NR, STIME, &m));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -6,5 +6,5 @@ PUBLIC int sync()
|
|||
{
|
||||
message m;
|
||||
|
||||
return(_syscall(FS, SYNC, &m));
|
||||
return(_syscall(VFS_PROC_NR, SYNC, &m));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@ _CONST char *name;
|
|||
message m;
|
||||
|
||||
_loadname(name, &m);
|
||||
return(_syscall(FS, UNLINK, &m));
|
||||
return(_syscall(VFS_PROC_NR, UNLINK, &m));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue