summaryrefslogtreecommitdiff
path: root/fdisk/fdisksunlabel.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2007-11-07 19:05:31 +0100
committerKarel Zak <kzak@redhat.com>2007-11-07 19:05:31 +0100
commit810f986b42ff7ecc805d134ef32013c3343df31e (patch)
treea3bed44c8f415166ea2d75dbb202793762f1ae43 /fdisk/fdisksunlabel.c
parentb7188e932e86137cacdf1ac74847d100b561c302 (diff)
downloadutil-linux-old-810f986b42ff7ecc805d134ef32013c3343df31e.tar.gz
fdisk: cleanup BLK* ioctls usage
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisk/fdisksunlabel.c')
-rw-r--r--fdisk/fdisksunlabel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fdisk/fdisksunlabel.c b/fdisk/fdisksunlabel.c
index 60ade06d..ff9a182d 100644
--- a/fdisk/fdisksunlabel.c
+++ b/fdisk/fdisksunlabel.c
@@ -19,6 +19,7 @@
#include <sys/sysmacros.h> /* major */
#include "nls.h"
+#include "blkdev.h"
#include <endian.h>
#ifdef HAVE_SCSI_SCSI_H
@@ -203,7 +204,7 @@ void create_sunlabel(void)
sunlabel->version = SSWAP32(SUN_LABEL_VERSION);
sunlabel->num_partitions = SSWAP16(SUN_NUM_PARTITIONS);
- res = disksize(fd, &llsectors);
+ res = blkdev_get_sectors(fd, &llsectors);
sec_fac = sector_size / 512;
if (!ioctl(fd, HDIO_GETGEO, &geometry)) {