]> Devi Nivas Git - cs3210-lab0.git/commitdiff
make code match comment
authorrsc <rsc>
Mon, 27 Aug 2007 23:53:17 +0000 (23:53 +0000)
committerrsc <rsc>
Mon, 27 Aug 2007 23:53:17 +0000 (23:53 +0000)
syscall.c
sysfile.c

index bc6c316010c4d70010c57dc1d44029e15ce83d8a..695873f6e952218beb4b1fd34da454515b498568 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -42,20 +42,20 @@ fetchstr(struct proc *p, uint addr, char **pp)
 
 // Fetch the argno'th 32-bit system call argument.
 int
-argint(int argno, int *ip)
+argint(int n, int *ip)
 {
-  return fetchint(cp, cp->tf->esp + 4 + 4*argno, ip);
+  return fetchint(cp, cp->tf->esp + 4 + 4*n, ip);
 }
 
 // Fetch the nth word-sized system call argument as a pointer
 // to a block of memory of size n bytes.  Check that the pointer
 // lies within the process address space.
 int
-argptr(int argno, char **pp, int size)
+argptr(int n, char **pp, int size)
 {
   int i;
   
-  if(argint(argno, &i) < 0)
+  if(argint(n, &i) < 0)
     return -1;
   if((uint)i >= cp->sz || (uint)i+size >= cp->sz)
     return -1;
@@ -68,10 +68,10 @@ argptr(int argno, char **pp, int size)
 // (There is no shared writable memory, so the string can't change
 // between this check and being used by the kernel.)
 int
-argstr(int argno, char **pp)
+argstr(int n, char **pp)
 {
   int addr;
-  if(argint(argno, &addr) < 0)
+  if(argint(n, &addr) < 0)
     return -1;
   return fetchstr(cp, addr, pp);
 }
@@ -88,7 +88,6 @@ extern int sys_kill(void);
 extern int sys_link(void);
 extern int sys_mkdir(void);
 extern int sys_mknod(void);
-//PAGEBREAK: 0
 extern int sys_open(void);
 extern int sys_pipe(void);
 extern int sys_read(void);
index f12b2e1e774fdb25d903311e4018783846c75056..d18aa1b0db46ca7073bcf81c690b4364aad7eb1e 100644 (file)
--- a/sysfile.c
+++ b/sysfile.c
@@ -17,7 +17,7 @@ argfd(int n, int *pfd, struct file **pf)
   int fd;
   struct file *f;
 
-  if(argint(argno, &fd) < 0)
+  if(argint(n, &fd) < 0)
     return -1;
   if(fd < 0 || fd >= NOFILE || (f=cp->ofile[fd]) == 0)
     return -1;