From: Theodore Ts'o Date: Thu, 11 Jan 2001 16:11:11 +0000 (+0000) Subject: ChangeLog, main.c: X-Git-Tag: E2FSPROGS-1_20~141 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=48e08e034ead9c3518fe3e130b2ff5012d31e055;p=tools%2Fe2fsprogs.git 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 + * 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 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 char *optarg; extern int optind; #endif #include -#include #include "resize2fs.h" @@ -167,7 +166,6 @@ int main (int argc, char ** argv) check_mount(device_name); if (flush) { -#ifdef BLKFLSBUF fd = open(device_name, O_RDONLY, 0); if (fd < 0) { @@ -176,17 +174,14 @@ int main (int argc, char ** argv) 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) {