[ECOS] Native file access under eCos synthetic

Dominique Henry de Villeneuve d.devilleneuve@ri.silicomp.fr
Fri Dec 7 07:33:00 GMT 2001


Bart Veer wrote:
> 
> >>>>> "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.
OK, thanks.

By the way, what is the state of getcwd() in EL/IX level 1 eCos
definition?
According to
http://sources.redhat.com/ecos/docs-latest/ecos-elix/ecos-elix.2.html,
it is not part of EL/IX. According to the EL/IX specification 
(http://sources.redhat.com/elix/api/current/api.html), it is.
And getcwd() is available in eCos also.

Thanks,
Dominique



More information about the Ecos-discuss mailing list