ChangeLog, main.c:
main.c (main): Use ext2fs_sync_device() instead of calling the
BLKFLSBUF ioctl directly.
diff --git a/resize/ChangeLog b/resize/ChangeLog
index c209164..7df86a6 100644
--- a/resize/ChangeLog
+++ b/resize/ChangeLog
@@ -1,5 +1,8 @@
2001-01-11 <tytso@snap.thunk.org>
+ * main.c (main): Use ext2fs_sync_device() instead of calling the
+ BLKFLSBUF ioctl directly.
+
* extent.c, main.c, resize2fs.c: Change ino_t to ext2_ino_t.
2001-01-01 <tytso@snap.thunk.org>
diff --git a/resize/main.c b/resize/main.c
index c91ddca..cff2d0f 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -19,7 +19,6 @@
extern int optind;
#endif
#include <fcntl.h>
-#include <sys/ioctl.h>
#include "resize2fs.h"
@@ -167,7 +166,6 @@
check_mount(device_name);
if (flush) {
-#ifdef BLKFLSBUF
fd = open(device_name, O_RDONLY, 0);
if (fd < 0) {
@@ -176,17 +174,14 @@
device_name);
exit(1);
}
- if (ioctl(fd, BLKFLSBUF, 0) < 0) {
- com_err("BLKFLSBUF", errno,
+ retval = ext2fs_sync_device(fd, 1);
+ if (retval) {
+ com_err(argv[0], retval,
_("while trying to flush %s"),
device_name);
exit(1);
}
close(fd);
-#else
- fprintf(stderr, _("BLKFLSBUF not supported\n"));
- exit(1);
-#endif /* BLKFLSBUF */
}
if (flags & RESIZE_DEBUG_IO) {