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]

Writing file to host system's OS filesystem


Thanks for your advise on how to access a file by including a romfs image in my code.

I was just wondering could you suggest any idea on how can I write any file to my host OS (i.e Win XP)?

Thanks
Samie


From: Andrew Lunn <andrew@lunn.ch>
To: Samie Hassan Ghauri <samiehg@hotmail.com>
CC: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Accessing File from host system's OS filesystem
Date: Thu, 12 Aug 2004 18:09:31 +0200

On Thu, Aug 12, 2004 at 03:58:15PM +0000, Samie Hassan Ghauri wrote:
> I have made the romfs including the bmp file using the utility given with
> the ecos package. But the image file is romfs.img. How can make it part of
> my image? When it IS finally included, can I then use fdopen() and ssize_t
> read(int fd, void *buf, size_t nbyte) to extract bytes from the file, as
> they are POSIX defined APIs?


Take a closer look at the test case. It does exactly this. The cdl
file contains some magic to uses some tcl to convert the binary to a
char array in a header file which is compiled into the test case
image.
        Andrew

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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