]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: add new API to read label specific data
authorKarel Zak <kzak@redhat.com>
Thu, 11 Jun 2015 12:19:47 +0000 (14:19 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 11 Jun 2015 12:19:47 +0000 (14:19 +0200)
commit5989556ad3dca8246f245eaf0867e89fb6fc9362
treeaf5c8a841b82853044a3c9a9625a3c97738375a9
parent535748a6175a142901069724cb11b60d4a63b671
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>
disk-utils/fdisk-list.c
libfdisk/src/bsd.c
libfdisk/src/dos.c
libfdisk/src/fdiskP.h
libfdisk/src/gpt.c
libfdisk/src/label.c
libfdisk/src/libfdisk.h.in
libfdisk/src/libfdisk.sym
libfdisk/src/sgi.c
libfdisk/src/sun.c