Changeset 610 for trunk/libs/mini-libc


Ignore:
Timestamp:
Dec 27, 2018, 7:38:58 PM (6 years ago)
Author:
alain
Message:

Fix several bugs in VFS to support the following
ksh commandis : cp, mv, rm, mkdir, cd, pwd

Location:
trunk/libs/mini-libc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libs/mini-libc/stdio.c

    r580 r610  
    2323
    2424#include <stdio.h>
     25#include <hal_shared_types.h>
     26#include <hal_user.h>
     27#include <syscalls_numbers.h>
    2528#include <stdarg.h>
    2629#include <almosmkh.h>
     
    3740//          stdio library functions
    3841////////////////////////////////////////////////////////////////////////////////////////
     42
     43/////////////////////////////
     44int rename( const char * old,
     45            const char * new )
     46{
     47    return hal_user_syscall( SYS_RENAME,
     48                             (reg_t)old,
     49                             (reg_t)new, 0, 0 );   
     50}
    3951
    4052///////////////////////////////////////////////////
  • trunk/libs/mini-libc/stdio.h

    r476 r610  
    4646}
    4747FILE;
     48
     49/*********************************************************************************************
     50 * This function causes the file/directory named <old> to be renamed as <new>.
     51 * If <new> exists, it is previously removed.
     52 *********************************************************************************************
     53 * @ returns 0 if success / returns -1 if failure.
     54 ********************************************************************************************/
     55int rename( const char * old,
     56            const char * new );
    4857
    4958/*********************************************************************************************
  • trunk/libs/mini-libc/unistd.h

    r589 r610  
    4848
    4949/*****************************************************************************************
    50  * This function change the current working directory in reference process descriptor.
     50 * This function change the current working directory in the reference process descriptor.
    5151 *****************************************************************************************
    5252 * @ pathname   : pathname (can be relative or absolute).
Note: See TracChangeset for help on using the changeset viewer.