diff options
author | Karel Zak | 2014-08-14 00:09:48 +0200 |
---|---|---|
committer | Karel Zak | 2014-08-14 00:09:48 +0200 |
commit | 72d2965c4470b2c740c409db37ed0369bbea98ee (patch) | |
tree | 89eb051f20aab36349bd77c0515ae335e05b680a /disk-utils/fdisk.c | |
parent | libfdisk: cleanup fdisk_is_label stuff (diff) | |
download | kernel-qcow2-util-linux-72d2965c4470b2c740c409db37ed0369bbea98ee.tar.gz kernel-qcow2-util-linux-72d2965c4470b2c740c409db37ed0369bbea98ee.tar.xz kernel-qcow2-util-linux-72d2965c4470b2c740c409db37ed0369bbea98ee.zip |
libfdisk: cleanup label geometry API
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/fdisk.c')
-rw-r--r-- | disk-utils/fdisk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c index 9d6230f70..4a9262905 100644 --- a/disk-utils/fdisk.c +++ b/disk-utils/fdisk.c @@ -503,6 +503,7 @@ void change_partition_type(struct fdisk_context *cxt) void list_disk_geometry(struct fdisk_context *cxt) { char *id = NULL; + struct fdisk_label *lb = fdisk_get_label(cxt, NULL); uint64_t bytes = cxt->total_sectors * cxt->sector_size; char *strsz = size_to_human_string(SIZE_SUFFIX_SPACE | SIZE_SUFFIX_3LETTER, bytes); @@ -512,7 +513,7 @@ void list_disk_geometry(struct fdisk_context *cxt) bytes, (uintmax_t) cxt->total_sectors); free(strsz); - if (fdisk_require_geometry(cxt) || fdisk_use_cylinders(cxt)) + if (fdisk_label_require_geometry(lb) || fdisk_use_cylinders(cxt)) fdisk_info(cxt, _("Geometry: %d heads, %llu sectors/track, %llu cylinders"), cxt->geom.heads, cxt->geom.sectors, cxt->geom.cylinders); |