Changeset 566 for trunk/kernel/syscalls/sys_chdir.c
- Timestamp:
- Oct 4, 2018, 11:50:21 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_chdir.c
r506 r566 35 35 36 36 ///////////////////////////////// 37 int sys_chdir ( c onst char * pathname )37 int sys_chdir ( char * pathname ) 38 38 { 39 39 error_t error; … … 46 46 if( hal_strlen_from_uspace( pathname ) >= CONFIG_VFS_MAX_PATH_LENGTH ) 47 47 { 48 printk("\n[ERROR] in %s : pathname too long\n", __FUNCTION__ ); 48 49 #if DEBUG_SYSCALLS_ERROR 50 printk("\n[ERROR] in %s : pathname too long / thread %x in process %x\n", 51 __FUNCTION__, this->trdid, process->pid ); 52 #endif 49 53 this->errno = ENFILE; 50 54 return -1; … … 54 58 hal_strcpy_from_uspace( kbuf , pathname , CONFIG_VFS_MAX_PATH_LENGTH ); 55 59 60 printk("\n[ERROR] in %s : not implemented yet\n", __FUNCTION__ ); 61 return -1; 62 56 63 // get cluster and local pointer on reference process 57 xptr_t ref_xp = process->ref_xp;58 process_t * ref_ptr = (process_t *)GET_PTR( ref_xp );59 cxy_t ref_cxy = GET_CXY( ref_xp );64 // xptr_t ref_xp = process->ref_xp; 65 // process_t * ref_ptr = (process_t *)GET_PTR( ref_xp ); 66 // cxy_t ref_cxy = GET_CXY( ref_xp ); 60 67 61 68 // get extended pointer on cwd lock in reference process 62 xptr_t lock_xp = hal_remote_lwd( XPTR( ref_cxy , &ref_ptr->cwd_lock ) );69 // xptr_t lock_xp = hal_remote_l64( XPTR( ref_cxy , &ref_ptr->cwd_lock ) ); 63 70 64 71 // get cwd lock in read mode 65 remote_rwlock_rd_lock( lock_xp );72 // remote_rwlock_rd_acquire( lock_xp ); 66 73 67 // call relevant VFS function68 error = vfs_chdir( process->vfs_cwd_xp , kbuf );74 // TODO ce n'et pas au VFS de le faire [AG] 75 // error = vfs_chdir( process->vfs_cwd_xp , kbuf ); 69 76 70 77 // release cwd lock 71 remote_rwlock_rd_unlock( lock_xp );78 // remote_rwlock_rd_release( lock_xp ); 72 79 73 80 if( error )
Note: See TracChangeset
for help on using the changeset viewer.