]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fdisk: API: add label probing functionality
authorDavidlohr Bueso <dave@gnu.org>
Sun, 8 Jul 2012 21:40:27 +0000 (23:40 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Jul 2012 15:59:52 +0000 (17:59 +0200)
commitb8855c868fce518d5f7c0aafb63accf99506643c
tree37e8cdbf301804d37b0822cd05202dba24b70bf3
parent4e806975527240e159f727624de73d3e56778647
fdisk: API: add label probing functionality

This patch sets the initial layout for label specific operations. A
new fdisk_label structure is created that will hold all these ops,
like new, delete, write and probe, among others. For now only probing
is implemented. Once this design is established, a copy of the probed
label will be copied to the main context structure, where calling the
specific functions will save 'disklabel' checks. Debugging support is
added as well.

This patch passes regression tests and manually passes bsd, sun, dos
and sgi labels probes.

Reviewed-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
15 files changed:
fdisks/fdisk.c
fdisks/fdisk.h
fdisks/fdiskaixlabel.c
fdisks/fdiskaixlabel.h
fdisks/fdiskbsdlabel.c
fdisks/fdiskbsdlabel.h
fdisks/fdiskdoslabel.c
fdisks/fdiskdoslabel.h
fdisks/fdiskmaclabel.c
fdisks/fdiskmaclabel.h
fdisks/fdisksgilabel.c
fdisks/fdisksgilabel.h
fdisks/fdisksunlabel.c
fdisks/fdisksunlabel.h
fdisks/utils.c