This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Native file access under eCos synthetic


>>>>> "Andrew" == Andrew Lunn <andrew.lunn@ascom.ch> writes:

    >> I call for that cyg_hal_sys_getcwd() declared in <cyg/hal/hal_io.h>: 
    >> externC char * cyg_hal_sys_getcwd(char * buf, size_t size);

    Andrew> You need to add the assembly language this implements this
    Andrew> function. The assembly needs to put the parameters onto
    Andrew> the stack, do the trap and then cleanup.

    Andrew> There are macros to do all the work. Look in

    Andrew> /packages/hal/synth/i386linux/current/src/syscall-i386-linux-1.0.S

    Andrew> getcwd seems to take two parameters, so you probably
    Andrew> need....

    Andrew> SYSCALL2(getcwd)

Correct and I have added cyg_hal_sys_getcwd() to the current sources.
However note that the system call returns an integer, not a char*,
corresponding to the number of characters in the buffer - see
/usr/src/linux-2.4/fs/dcache.h for more information.

Bart


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]