[PATCH] Fix bogus fsync() error

Christian Franke Christian.Franke@t-online.de
Mon Jan 31 19:44:00 GMT 2011


If used on raw devices like /dev/sda fsync() always fails with EBADRQC 
(54) because FlushFileBuffers() always fails with ERROR_INVALID_FUNCTION 
(1).

The attached patch fixes this by simply ignoring this error in the 
fhandler_base implementation. This should not affect any real flush 
errors which likely would return other error codes.

An alternative approach would be to ignore the error only in a new 
fhandler_raw_dev/floppy::fsync(). IMO not worth the effort is this case.

Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fsync-rawdev-err.patch
Type: text/x-patch
Size: 763 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20110131/33021442/attachment.bin>


More information about the Cygwin-patches mailing list