This is the mail archive of the ecos-discuss@sourceware.org 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 deletion / unlink problem


Because the filesystem is buffered, the delete does not occur unless you unmount the file system or an FSSYNC. FSSYNC is something I added a while back specifically for this. (There is probably some discussion on the Mailing list back in October of 2004, starting with http://sourceware.org/ml/ecos-patches/2004-10/msg00074.html). You call it using a setinfo call with a FS_INFO_SYNC operation.


Haydn Nelson wrote:
So this is my 1st question in this forum and I am relatively new to eCos...

I am having trouble getting eCos to delete a file on CF which has FAT16

I am able to fopen() the file, read and write to it... but when I use remove("File Name") or unlink("File Name") I get a zero returned and the file still exists when I view it on another system.. I can use the same functions with a file name that does not exist and I get a true returned. Is there some other macro or argument I am missing to be able to simply delete a file. I have searched through the ecos-discuss FAQ and have not found this exact problem. I am reading and writing the file in the root directory of the CF card.

I imagine it is something simple...

Any thoughts would be greatly appreciated.

- Haydn Nelson


-- 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]