This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Native file access under eCos synthetic
- From: Bart Veer <bartv at redhat dot com>
- To: andrew dot lunn at ascom dot ch
- Cc: d dot devilleneuve at ri dot silicomp dot fr, ecos-discuss at sources dot redhat dot com
- Date: Fri, 7 Dec 2001 13:57:29 GMT
- Subject: Re: [ECOS] Native file access under eCos synthetic
- References: <3BF4ED44.3ABEB31E@ri.silicomp.fr> <20011116114549.Q16434@biferten.ma.tech.ascom.ch> <3C10A484.88D4C991@ri.silicomp.fr> <20011207124903.D19614@biferten.ma.tech.ascom.ch>
- Reply-to: bartv at redhat dot com
>>>>> "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