Changeset 440 for trunk/kernel/syscalls/sys_timeofday.c
- Timestamp:
- May 3, 2018, 5:51:22 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_timeofday.c
r407 r440 2 2 * sys_timeofday.c - Get current time 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; 40 40 41 41 uint32_t tm_s; … … 50 50 if( tz ) 51 51 { 52 printk("\n[ERROR] in %s for thread %x in process %x : tz argument must be NULL\n", 53 __FUNCTION__ , this->trdid , process->pid ); 52 53 #if DEBUG_SYSCALLS_ERROR 54 printk("\n[ERROR] in %s for thread %x in process %x : tz argument must be NULL\n", 55 __FUNCTION__ , this->trdid , process->pid ); 56 #endif 54 57 this->errno = EINVAL; 55 58 return -1; … … 57 60 58 61 // check tv 59 error = vmm_ v2p_translate( false , tv , &paddr);62 error = vmm_get_vseg( process , (intptr_t)tv , &vseg ); 60 63 61 64 if( error ) 62 65 { 63 printk("\n[ERROR] in %s for thread %x in process %x : tv argument unmapped\n", 64 __FUNCTION__ , this->trdid , process->pid ); 66 67 #if DEBUG_SYSCALLS_ERROR 68 printk("\n[ERROR] in %s : user buffer tz unmapped / thread %x / process %x\n", 69 __FUNCTION__ , (intptr_t)tz , this->trdid , process->pid ); 70 vmm_display( process , false ); 71 #endif 65 72 this->errno = EINVAL; 66 73 return -1;
Note: See TracChangeset
for help on using the changeset viewer.