fetchint isn't used any more
This commit is contained in:
		
							parent
							
								
									f0987d82dc
								
							
						
					
					
						commit
						cc1a303d09
					
				
					 2 changed files with 0 additions and 14 deletions
				
			
		| 
						 | 
				
			
			@ -129,7 +129,6 @@ int             argint(int, int*);
 | 
			
		|||
int             argptr(int, uint64*, int);
 | 
			
		||||
int             argstr(int, char*, int);
 | 
			
		||||
int             argaddr(int, uint64 *);
 | 
			
		||||
int             fetchint(uint64, int*);
 | 
			
		||||
int             fetchstr(uint64, char*, int);
 | 
			
		||||
int             fetchaddr(uint64, uint64*);
 | 
			
		||||
void            syscall();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,19 +7,6 @@
 | 
			
		|||
#include "syscall.h"
 | 
			
		||||
#include "defs.h"
 | 
			
		||||
 | 
			
		||||
// Fetch the int at addr from the current process.
 | 
			
		||||
int
 | 
			
		||||
fetchint(uint64 addr, int *ip)
 | 
			
		||||
{
 | 
			
		||||
  struct proc *p = myproc();
 | 
			
		||||
 | 
			
		||||
  if(addr >= p->sz || addr+4 > p->sz)
 | 
			
		||||
    return -1;
 | 
			
		||||
  if(copyin(p->pagetable, (char *)ip, addr, sizeof(*ip)) != 0)
 | 
			
		||||
    return -1;
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Fetch the uint64 at addr from the current process.
 | 
			
		||||
int
 | 
			
		||||
fetchaddr(uint64 addr, uint64 *ip)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue