]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fdisk: API: add mbr
authorDavidlohr Bueso <dave@gnu.org>
Sun, 17 Jun 2012 16:10:07 +0000 (18:10 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 21 Jun 2012 06:04:28 +0000 (08:04 +0200)
commit38b36353cd1861f47af58a6991f9dfdfbbf34fab
tree77cdf5065d6de66899b5ee2cd9d6ca333258637b
parent7bd9699a74687f2297b7333d09d1bb021e350a73
fdisk: API: add mbr

This patch adds to the fdisk API the relevant logic to buffers that have MBR. This also serves for
future GPT support for the protective MBR. All labels have been updated to have access to the cxt
structure for the corresponding buffer.

An important observation is that SGI no longer uses the standard qsort(3) function to sort partitions,
as it needs access to cxt. To address this, a heap sort implementation from the kernel was added to
the label code and adapted to fdisk.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 files changed:
fdisk/fdisk.c
fdisk/fdisk.h
fdisk/fdiskaixlabel.c
fdisk/fdiskaixlabel.h
fdisk/fdiskdoslabel.c
fdisk/fdiskdoslabel.h
fdisk/fdiskmaclabel.c
fdisk/fdiskmaclabel.h
fdisk/fdisksgilabel.c
fdisk/fdisksgilabel.h
fdisk/fdisksunlabel.c
fdisk/fdisksunlabel.h
fdisk/utils.c