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]

Re: file handle problem on synthetic target


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


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