Changeset 407 for trunk/kernel/syscalls/sys_chdir.c
- Timestamp:
- Nov 7, 2017, 3:08:12 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_chdir.c
r301 r407 41 41 process_t * process = this->process; 42 42 43 // get pathname copy in kernel space 44 error = hal_strcpy_from_uspace( kbuf, pathname, CONFIG_VFS_MAX_PATH_LENGTH ); 45 46 if( error ) 43 // check pathname length 44 if( hal_strlen_from_uspace( pathname ) >= CONFIG_VFS_MAX_PATH_LENGTH ) 47 45 { 48 printk("\n[ERROR] in %s : pathname too long for thread %x in process %x\n", 49 __FUNCTION__ , this->trdid , process->pid ); 46 printk("\n[ERROR] in %s : pathname too long\n", __FUNCTION__ ); 50 47 this->errno = ENFILE; 51 48 return -1; 52 49 } 50 51 // copy pathname in kernel space 52 hal_strcpy_from_uspace( kbuf , pathname , CONFIG_VFS_MAX_PATH_LENGTH ); 53 53 54 54 // get cluster and local pointer on reference process
Note: See TracChangeset
for help on using the changeset viewer.