mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-28 20:44:08 +08:00
flushb.c (ext2fs_sync_device): If the BLKFLSBUF ioctl succeeds,
don't try the FDFLUSH ioctl that was required for floppies with older kernels. This avoids needless whining from the MD device driver. (Addresses Sourceforge bug #545832).
This commit is contained in:
parent
1dd090faa0
commit
55ca9ae5ec
@ -1,5 +1,10 @@
|
||||
2002-10-31 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* flushb.c (ext2fs_sync_device): If the BLKFLSBUF ioctl succeeds,
|
||||
don't try the FDFLUSH ioctl that was required for floppies
|
||||
with older kernels. This avoids needless whining from the
|
||||
MD device driver. (Addresses Sourceforge bug #545832).
|
||||
|
||||
* openfs.c (ext2fs_open): Fix bug which caused us to pass the
|
||||
wrong group_block to ext2fs_descriptor_block_loc if we're
|
||||
using the backup superblock/block group descriptors.
|
||||
|
@ -62,12 +62,13 @@ errcode_t ext2fs_sync_device(int fd, int flushb)
|
||||
if (flushb) {
|
||||
|
||||
#ifdef BLKFLSBUF
|
||||
ioctl (fd, BLKFLSBUF, 0); /* In case this is a HD */
|
||||
if (ioctl (fd, BLKFLSBUF, 0) == 0)
|
||||
return 0;
|
||||
#else
|
||||
#warning BLKFLSBUF not defined
|
||||
#endif
|
||||
#ifdef FDFLUSH
|
||||
ioctl (fd, FDFLUSH, 0); /* In case this is floppy */
|
||||
ioctl (fd, FDFLUSH, 0); /* In case this is a floppy */
|
||||
#else
|
||||
#warning FDFLUSH not defined
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user