Ignore:
Timestamp:
Dec 3, 2018, 12:18:40 PM (3 years ago)
Author:
alain
Message:

Improve the FAT32 file system to support cat, rm, cp commands.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_rmdir.c

    r566 r604  
    3636int sys_rmdir( char * pathname )
    3737{
    38     error_t     error;
     38    // error_t     error;
    3939    char        kbuf[CONFIG_VFS_MAX_PATH_LENGTH];
    4040       
     
    4545    if( hal_strlen_from_uspace( pathname ) >= CONFIG_VFS_MAX_PATH_LENGTH )
    4646    {
    47         printk("\n[ERROR] in %s : pathname too long\n", __FUNCTION__ );
     47
     48#if DEBUG_SYSCALLS_ERROR
     49printk("\n[ERROR] in %s : pathname too long\n", __FUNCTION__ );
     50#endif
    4851        this->errno = ENFILE;
    4952        return -1;
     
    5962
    6063    // get extended pointer on cwd inode
    61     xptr_t cwd_xp = hal_remote_l64( XPTR( ref_cxy , &ref_ptr->vfs_cwd_xp ) );
     64    // xptr_t cwd_xp = hal_remote_l64( XPTR( ref_cxy , &ref_ptr->vfs_cwd_xp ) );
    6265   
    6366    // get the cwd lock in write mode from reference process
     
    6568
    6669    // call the relevant VFS function
    67         error = vfs_rmdir( cwd_xp,
    68                        kbuf );
     70        printk("\n[ERROR] in %s : non implemented yet\n", __FUNCTION__ );
    6971
    7072    // release the cwd lock
    7173        remote_rwlock_wr_release( XPTR( ref_cxy , &ref_ptr->cwd_lock ) );
    7274
    73     if( error )
    74         {
    75         printk("\n[ERROR] in %s : cannot remove directory %s\n",
    76                __FUNCTION__ , kbuf );
    77                 this->errno = error;
    78                 return -1;
    79         }
    80    
    8175        return 0;
    8276
Note: See TracChangeset for help on using the changeset viewer.