Changeset 566 for trunk/kernel/syscalls/sys_mkdir.c
- Timestamp:
- Oct 4, 2018, 11:50:21 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_mkdir.c
r457 r566 33 33 /////////////////////////////////// 34 34 int sys_mkdir( char * pathname, 35 uint32_t mode )35 uint32_t mode __attribute__((unused)) ) 36 36 { 37 37 error_t error; … … 58 58 } 59 59 60 printk("\n[ERROR] in %s : not implemented yet\n", __FUNCTION__ ); 61 return -1; 62 60 63 // copy pathname in kernel space 61 64 hal_strcpy_from_uspace( kbuf , pathname , CONFIG_VFS_MAX_PATH_LENGTH ); 62 65 63 66 // get cluster and local pointer on reference process 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 );67 // xptr_t ref_xp = process->ref_xp; 68 // process_t * ref_ptr = (process_t *)GET_PTR( ref_xp ); 69 // cxy_t ref_cxy = GET_CXY( ref_xp ); 67 70 68 71 // get extended pointer on cwd inode 69 xptr_t cwd_xp = hal_remote_lwd( XPTR( ref_cxy , &ref_ptr->vfs_cwd_xp ) );72 // xptr_t cwd_xp = hal_remote_l64( XPTR( ref_cxy , &ref_ptr->vfs_cwd_xp ) ); 70 73 71 74 // get the cwd lock in read mode from reference process 72 remote_rwlock_rd_lock( XPTR( ref_cxy , &ref_ptr->cwd_lock ) );75 // remote_rwlock_rd_lock( XPTR( ref_cxy , &ref_ptr->cwd_lock ) ); 73 76 74 77 // call the relevant VFS function 75 error = vfs_mkdir( cwd_xp,76 kbuf,77 mode );78 // error = vfs_mkdir( cwd_xp, 79 // kbuf, 80 // mode ); 78 81 79 82 // release the cwd lock 80 remote_rwlock_rd_unlock( XPTR( ref_cxy , &ref_ptr->cwd_lock ) );83 // remote_rwlock_rd_unlock( XPTR( ref_cxy , &ref_ptr->cwd_lock ) ); 81 84 82 85 if( error )
Note: See TracChangeset
for help on using the changeset viewer.