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: Re: fatfs help.


More info:
fileio1.c works great on the CF (minus the file.max test).

However, I still cannot delete files permanently from within my application. I believe the difference is that the end of fileio1.c code umounts root. I do not have that luxury. I have seen posts referencing needing to do an fsync(). But how do I fsync the directory after deleting a file?

Thanks
David


David Brennan wrote:


Ok, I feel pretty stupid now. I actually only have a partial problem. My original problem was actually that I was mounting the VME hard drive instead of the CF under eCos. (They had similar original file structures so it was not immediately noticed.)
At least now everyone's file listing matches. But I still have a problem unlinking files from the hard drive under eCos.
The fileio1 test was running fine (up until it got to max file, which on a 20 Gig HD is not a good test to run). But when I deleted file.max from the HD with my application, it showed the file deleted. But it was still there under FreeDOS and eCos after a reboot. The other files created/deleted under fileio1 worked just fine. One difference is file.max was never actually correctly closed. Its file size is listed as 0 bytes.


I will re-run fileio1 (without file.max) on the CF tomorrow if time permits.


David Brennan wrote:


I honestly have not done much (any) troubleshooting on this yet. And I am on vacation this week, so I do not have access to the hardware. However, here are the answers to you questions.
1. No, I have not tried reading the CF in windows/Linux.
2. I have only played with the one CF so far and it was formatted MS-DOS 6.22. (Or may have been pre-formatted, I actually don't remember now. I know it used to boot to MS-DOS 6.22.)
3. The code is from CVS. I saw your patches, but I figured I'd wait until someone decides to commit them before trying them out. Unless you think this may be the problem.
4. I don't have the code at home. I can provide a code sample next week.


Thanks for your advice. I was definitely planning on getting around to testing the more when I get back next week.

Thanks
David Brennan

Savin Zlobec wrote:

David Brennan wrote:

I am using fatfs on i386 pc ide device and am having a problem. I was wondering if you could point me in the right direction for a solution.

First, I am not a FS genius, nor a FAT expert. So please bear with me.

If I unlink a file in eCos, a "dir" from within eCos shows the file missing.
When I reboot the system into FreeDos (0.9rc5, if that matters) the file is still in the directory listing.
Rebooting back into the eCos app still shows the file missing (it's not a cached fat table issue).


Is the problem most likely eCos fatfs, pc-ide driver, FreeDos?

Any tips on how to narrow the problem down would be greatly appreciated. I know I could turn on some of the tracing in the fatfs, but I still wouldn't be able to read/understand that. But if someone else can decode it, I can provide the data.

The fat file system was formatted originally with MS-DOS 6.22. The drive has been converted to FreeDos 0.9rc5 kernel, but never reformatted. It is a 192MB CF card.





Did you try to read the CF in anodher system (linux or windows) ?


Does this error also occour with an CF formatted from linux or windows ?

Do you use the fatfs from CVS or some newer version (I posted some patches on ecos-patches list) ?

Can you provide a test case in form of a small program wich creates and deletes a file ?

Alternatively if you send me the trace output I'll check it.

savin




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