This is the mail archive of the ecos-discuss@sourceware.cygnus.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]

Re: File access under linux synthetic target


> For various reasons, I'd like to be able to get at native files from
> under the linux synthetic target.  I also need fseek and ftell.
> Before I started coding, I thought it might be an idea to get others
> opinions on the "best" way to do this.
> 
> Out of interest, has anyone done any work along these lines?

I've used the undocumented back door to the host OS to do write access
to files. I just needed to be able to log results from a test runs to
a file so the demands were pritty low and quite easy to do using the
back door. I'd consider this a hack rather than the "best" way to do
this. You have to be very carefull with the backdoor. If its blocks
the who of eCos blocks, not just a single thread.

How would i do it in a better way? I think i would look at the pseudo
device driver work thats been mentioned here lately. That will take
care of the blocking issue. I'd look at implementing a generic file
system interface for ecos, one with the standard calls, mount, umount,
open, close, read, write & seek. Under this interface i'd write a very
simple 'network file system' protocol which talks to a virtual device
which does all the real work with the filesystem.

File systems support is something that comes up quite often on the
mail list, probably second to TCP/IP. Now that TCP/IP is in beta, i
personally think this is the next thing RedHat should work on. Not the
file systems themselves, but the generic part, libc down to the
generic interface to the file system. I don't think they should work
on specific filesystems since the requirements are so wide, FLASH,
NFS, RAM Discs and even real drives. Let people contribute such file
systems, or contract RedHat for a specific filesystem. Specifying the
generic interface is the important thing or we will end up with lots
of incompatible file systems.

        Andrew





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