Changeset 407 for trunk/kernel/syscalls/sys_open.c
- Timestamp:
- Nov 7, 2017, 3:08:12 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_open.c
r305 r407 55 55 } 56 56 57 // get pathname copy in kernel space 58 error = hal_strcpy_from_uspace( kbuf , pathname , CONFIG_VFS_MAX_PATH_LENGTH ); 59 60 if( error ) 57 // check pathname length 58 if( hal_strlen_from_uspace( pathname ) >= CONFIG_VFS_MAX_PATH_LENGTH ) 61 59 { 62 60 printk("\n[ERROR] in %s : pathname too long\n", __FUNCTION__ ); … … 65 63 } 66 64 65 // copy pathname in kernel space 66 hal_strcpy_from_uspace( kbuf , pathname , CONFIG_VFS_MAX_PATH_LENGTH ); 67 67 68 // get cluster and local pointer on reference process 68 69 xptr_t ref_xp = process->ref_xp; … … 70 71 cxy_t ref_cxy = GET_CXY( ref_xp ); 71 72 72 // get extended pointer on cwd inode73 xptr_t cwd_xp = hal_remote_lwd( XPTR( ref_cxy , &ref_ptr->vfs_cwd_xp ) );74 75 73 // get the cwd lock in read mode from reference process 76 74 remote_rwlock_rd_lock( XPTR( ref_cxy , &ref_ptr->cwd_lock ) ); 77 75 78 76 // call the relevant VFS function 79 error = vfs_open( cwd_xp,77 error = vfs_open( process, 80 78 kbuf, 81 79 flags,
Note: See TracChangeset
for help on using the changeset viewer.