(Fwd) Re: DOSFS bug fixes, IDE drivers and sample released
Joel Sherrill
joel.sherrill at OARcorp.com
Fri May 23 13:11:50 UTC 2003
Chris Johns wrote:
>
> Angelo Fraietta wrote:
> > Ralf Corsepius wrote:
> >
> >> Have you tried using sync(2)?
> >>
> >> I.e. something similar to this:
> >>
> >> fwrite( ...);
> >> fclose(..);
> >>
> >>
> >> sync();
> >>
> > I get a link error -- undefined reference to sync
I see it in the OpenGroup specification but we don't have it.
I don't remember it in POSIX 1003.1b but that doesn't mean much
without me checking it. :)
>
> I do not see a 'sync' but I see:
>
> int fsync(int fd);
> int fdatasync(int fd);
>
> are present. Maybe you could try these.
>
> Should these calls also flush the user-space buffered (libc) data ?
I don't know if they can since they are called with an int fd and
fsync wants a FILE *stream. The OpenGroup standard on both calls
makes no mention of libc type buffering. It only mentions device
queues. The Linux man pages say the same thing.
My gut feeling is that the scope of the call is implied by the
argument being an int fd not a FILE *.
> --
> Chris Johns, cjohns at cybertec . com . au
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list