This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
FILESYSTEM QUESTION: reading all of the data in a file.
- From: Dave Rentoul <drentoul at elands dot co dot nz>
- To: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 10 Nov 2004 08:57:18 +1300
- Subject: [ECOS] FILESYSTEM QUESTION: reading all of the data in a file.
the POSIX read command: extern ssize_t read(int fd, void *buf,
size_t nbyte);
I wish to read all the bytes in a jffs2 file, then use the size returned
in a "cyg_io_write()" command to a serial interface modem, to send this
data to the TX_FIFO.
Is there a method of reading all the bytes in a file without keeping a
separately record of the number of bytes written to the file? or, is
there a function that returns the number of bytes of data in a file? if
so, what is the POSIX command?
Thank you
Dave Rentoul
Elands Communications Ltd
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss