diff options
author | Karel Zak | 2015-06-11 14:19:47 +0200 |
---|---|---|
committer | Karel Zak | 2015-06-11 14:19:47 +0200 |
commit | 5989556ad3dca8246f245eaf0867e89fb6fc9362 (patch) | |
tree | af5c8a841b82853044a3c9a9625a3c97738375a9 /disk-utils/fdisk-list.c | |
parent | libfdisk: (dos) fix cylinders calculation (diff) | |
download | kernel-qcow2-util-linux-5989556ad3dca8246f245eaf0867e89fb6fc9362.tar.gz kernel-qcow2-util-linux-5989556ad3dca8246f245eaf0867e89fb6fc9362.tar.xz kernel-qcow2-util-linux-5989556ad3dca8246f245eaf0867e89fb6fc9362.zip |
libfdisk: add new API to read label specific data
* removes list() label operation from internal API
The list() has been based on fdisk_info() it was useless for
anything else than print on stdout...
* add a new get_item() label operation and fdisk_get_disklabel_item() public API
The new API provides abstract and pretty simple way how to get label
specific disk label information, for example
fdisk_get_disklabel_item(cxt, GPT_LABELITEM_ENTRIESLBA, &iterm);
return LBA of the array with GPT entries.
Note that this patch does not implement public functions to get
data from the @item object.
* removes get_id() label operation -- it's subset of the new get_item()
* the new internal API is also used to implement backwardly compatible
fdisk_list_disklabel() and fdisk_get_disklabel_id()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/fdisk-list.c')
-rw-r--r-- | disk-utils/fdisk-list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-utils/fdisk-list.c b/disk-utils/fdisk-list.c index b2b528e97..5ef92b13c 100644 --- a/disk-utils/fdisk-list.c +++ b/disk-utils/fdisk-list.c @@ -75,7 +75,7 @@ void list_disk_geometry(struct fdisk_context *cxt) fdisk_info(cxt, _("Disklabel type: %s"), fdisk_label_get_name(lb)); - if (fdisk_get_disklabel_id(cxt, &id) == 0 && id) + if (!fdisk_is_details(cxt) && fdisk_get_disklabel_id(cxt, &id) == 0 && id) fdisk_info(cxt, _("Disk identifier: %s"), id); } |