Whamcloud - gitweb
e2fsck: don't flush to device opened in read-only mode
authorKonstantin Chistyakov <Konstantin.Chistyakov@paragon-software.com>
Mon, 29 May 2017 23:11:38 +0000 (19:11 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 29 May 2017 23:11:42 +0000 (19:11 -0400)
commitb67bf3b085c38e30c35bded55004d6dadefb7dd4
treee81946f869a251caf11bb6f7db52370350d99c3d
parent665ebf3710f685fdd37d849676bb14601bd2cc6f
e2fsck: don't flush to device opened in read-only mode

If the e2fsck is called with both the -f and -n options, it will
complete with an exit status of 8 due to an error when trying to flush
the io_channel (which was opened read-only) when built on on Cygwin on
Windows 8.1 and Windows 10.  Apparently Cygwin is unhappy when fsync
is called on a file descriptor opened read-only.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/unix.c