This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Can't open() file on a FAT file system
- From: Bruno Ricci <amraam83 at gmail dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 14 Sep 2009 15:04:25 +0200
- Subject: Re: [ECOS] Can't open() file on a FAT file system
- References: <8727e5730909140344pa7d1598qad5ab86d42d6b92c@mail.gmail.com> <888069a80909140527o57e588eq888007406cc1eeca@mail.gmail.com>
Thanks, it worked.
By the way, do you know if there's a way to support long file names?
Thanks again
Bruno
On Mon, Sep 14, 2009 at 2:27 PM, David Brennan <ecos@brennanhome.com> wrote:
>
> On Mon, Sep 14, 2009 at 3:44 AM, Bruno Ricci <amraam83@gmail.com> wrote:
>>
>> Hi,
>>
>> I've been able to mount the second partition of a FAT hard drive with:
>>
>> int x = mount ("/dev/idedisk0/2" , "/", "fatfs");
>>
>> but now when I try to open() a file with:
>>
>> int fd2 = open("/index.html", O_RDONLY);,
>>
>> the function returns 0, which is not a valid file descriptor.
>> Obviously file /index.html exists...
>>
>> Any suggestion?
>>
> I think your problem is that index.html is a long file name. The eCos
> implementation of FAT does not support long file names. You should rename
> the file to index.htm, or access it as INDEX~1.HTM (I think).
>
> David Brennan
>
>>
>> Thanks in advance,
>>
>> Bruno
>>
>> --
>> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
>> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>>
>
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss