diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/zdb/zdb.c | 2 | ||||
-rw-r--r-- | cmd/zpool/zpool_main.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index dd8e652d9..7c3ef3ef4 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -3444,7 +3444,7 @@ dump_label(const char *dev) exit(1); } - if (S_ISBLK(statbuf.st_mode) && ioctl(fd, BLKFLSBUF) != 0) + if (S_ISBLK(statbuf.st_mode) && zfs_dev_flush(fd) != 0) (void) printf("failed to invalidate cache '%s' : %s\n", path, strerror(errno)); diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 6071babfd..0ac8c2a5e 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -1178,7 +1178,7 @@ zpool_do_labelclear(int argc, char **argv) * fatal when the device does not support BLKFLSBUF as would be the * case for a file vdev. */ - if ((ioctl(fd, BLKFLSBUF) != 0) && (errno != ENOTTY)) + if ((zfs_dev_flush(fd) != 0) && (errno != ENOTTY)) (void) fprintf(stderr, gettext("failed to invalidate " "cache for %s: %s\n"), vdev, strerror(errno)); |