This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: file handle problem on synthetic target
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Helen Snitkovsky <helens at hydrix dot com>
- Cc: ecos discuss group <ecos-discuss at ecos dot sourceware dot org>
- Date: Fri, 2 Jul 2004 08:58:00 +0200
- Subject: Re: [ECOS] file handle problem on synthetic target
- References: <1088724733.27647.8.camel@patty.private.hydrix.com>
On Fri, Jul 02, 2004 at 09:32:14AM +1000, Helen Snitkovsky wrote:
> Hello gurus,
> I am trying to run a simple program that opens a file, print
> "Successful" if it was open, and close a file afterwards. However, file
> opening is failed when the application was compiled with the synthetic
> target. I really appreciate your help with that issue.
>
> The code is:
> #include <stdio.h>
> #include <cyg/libc/stdio/stdiofiles.hxx> // C library files
> #include <cyg/libc/stdio/stream.hxx> // C library streams
> #include <cyg/libc/stdio/io.inl> // I/O system inlines
>
> int main()
> {
>
> FILE *fp = fopen("/home/ecos/fo/mytmp", "r");
>
> if (fp == NULL)
> printf("open failed\n");
> else
> printf("open sucessful\n");
>
> fclose(fp);
>
> return 0;
> }
Does this file exist in one of the eCos file systems? You don't appear
to be mounting any file system!
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss