Changeset 440 for trunk/kernel/syscalls/sys_stat.c
- Timestamp:
- May 3, 2018, 5:51:22 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_stat.c
r407 r440 2 2 * sys_stat.c - Return statistics on a file or directory. 3 3 * 4 * Author Alain Greiner (2016,2017 )4 * Author Alain Greiner (2016,2017,2018) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 37 37 { 38 38 error_t error; 39 paddr_t paddr;39 vseg_t * vseg; // for user space checking 40 40 struct stat k_stat; // kernel space 41 41 xptr_t file_xp; … … 46 46 47 47 // check stat structure in user space 48 error = vmm_ v2p_translate( false , u_stat , &paddr);48 error = vmm_get_vseg( process , (intptr_t)u_stat , &vseg ); 49 49 50 50 if( error ) 51 51 { 52 printk("\n[ERROR] in %s : stat structure unmapped for thread %x in process %x\n", 53 __FUNCTION__ , this->trdid , process->pid ); 52 53 #if DEBUG_SYCALL_ERROR 54 printk("\n[ERROR] in %s : stat structure unmapped %x / thread %x / process %x\n", 55 __FUNCTION__ , (intptr_t)u_stat , this->trdid , process->pid ); 56 vmm_display( process , false ); 57 #endif 54 58 this->errno = EINVAL; 55 59 return -1;
Note: See TracChangeset
for help on using the changeset viewer.