diff options
author | Karel Zak | 2007-11-07 19:05:31 +0100 |
---|---|---|
committer | Karel Zak | 2007-11-07 19:05:31 +0100 |
commit | 810f986b42ff7ecc805d134ef32013c3343df31e (patch) | |
tree | a3bed44c8f415166ea2d75dbb202793762f1ae43 /fdisk/cfdisk.c | |
parent | mkswap: cleanup kB vs. KiB usage in error messages (diff) | |
download | kernel-qcow2-util-linux-810f986b42ff7ecc805d134ef32013c3343df31e.tar.gz kernel-qcow2-util-linux-810f986b42ff7ecc805d134ef32013c3343df31e.tar.xz kernel-qcow2-util-linux-810f986b42ff7ecc805d134ef32013c3343df31e.zip |
fdisk: cleanup BLK* ioctls usage
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisk/cfdisk.c')
-rw-r--r-- | fdisk/cfdisk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c index 05c8cd6ac..7ed11ea19 100644 --- a/fdisk/cfdisk.c +++ b/fdisk/cfdisk.c @@ -81,6 +81,7 @@ #include <linux/types.h> #include "nls.h" +#include "blkdev.h" #include "xstrncpy.h" #include "common.h" #include "gpt.h" @@ -1687,7 +1688,7 @@ fill_p_info(void) { ioctl(fd, BLKFLSBUF); /* ignore errors */ /* e.g. Permission Denied */ - if (disksize(fd, &llsectors)) + if (blkdev_get_sectors(fd, &llsectors) == -1) fatal(_("Cannot get disk size"), 3); actual_size = llsectors; |