(Fwd) Re: DOSFS bug fixes, IDE drivers and sample released

Angelo Fraietta angelo_f at bigpond.com
Wed Apr 16 00:21:26 UTC 2003



Angelo Fraietta wrote:

> I have implemented this into my app, hwoever, when I try to examine 
> the file, I get zero bytes.
> I did the following
>
>     fd = open(nvram_file,O_WRONLY | O_CREAT | O_TRUNC,S_IREAD|S_IWRITE);
>     if (fd <0)
>         {
>             printf ("Unable to open %s\r\n", nvram_file);
>         }
>     else
>         {
>             unsigned i;
>             for (i = 0; i < 255; i++)
>                 {
>                     char c = (char) i;
>                     int bytes = write(fd, &c, 1);
>                     printf ("Wrote %u bytes \r\n", bytes);
>                 }
>             close(fd);
>             printf ("Close file\r\n");


After running test example again, I have noticed that the file does not actually get written to the disk unless I write another file after writing the first. The second file has a size of zero bytes.


In my application, I have tried doing this also, however, the second file does not get created and the first file is zero bytes. I am running mine in a low priority task (the other are currently blocked thorugh). Is there some limitation to the task type at all?

-- 
Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page


http://www.users.bigpond.com/angelo_f/

There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
    Bernard of Clairvaux (1090 - 1153)







More information about the users mailing list