Hi David,
This is kind of OK, but not ideal:
Here is the Bugs section from the man page for sync:
According to the standard specification (e.g., SVID), sync()
schedules the writes, but may return before the actual writing is
done. However, since version 1.3.20 Linux does actually wait.
(This still does not guarantee data integrity: modern disks have
large caches.)
I prefer the approach of doing a mount -o remount,ro ... of your
filesystem.
Cheers
Matt
On 12/02/2007, at 12:20 PM, David T. L. Wong wrote:
Hi all,
If I issue sync() after writing to USB disk (FAT or EXT2 formatted),
and then only do read operations afterward. Is it safe to just
unplug it
from USB port? the kernel is uClinux-2.4.22.
Thanks in advance.
David
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
---
WorkWare Systems Pty Ltd
W: www.workware.net.au
P: +61 434 916 185
F: +61 7 3102 9221
E: [EMAIL PROTECTED]
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev