Make fetchint and fetchstr use proc instead of taking a struct proc

Previously, these were inconsistent: they used their struct proc
argument for bounds checking, but always copied the argument from the
current address space (and hence the current process).  Drop the
struct proc argument and always use the current proc.

Suggested by Carmi Merimovich.
This commit is contained in:
Austin Clements 2012-02-17 23:20:13 -05:00
parent 12abb1a561
commit 9d59eb0151
3 changed files with 13 additions and 13 deletions

4
defs.h
View file

@ -142,8 +142,8 @@ char* strncpy(char*, const char*, int);
int argint(int, int*);
int argptr(int, char**, int);
int argstr(int, char**);
int fetchint(struct proc*, uint, int*);
int fetchstr(struct proc*, uint, char**);
int fetchint(uint, int*);
int fetchstr(uint, char**);
void syscall(void);
// timer.c