summaryrefslogtreecommitdiffstats
path: root/fdisks/Makemodule.am
diff options
context:
space:
mode:
authorDavidlohr Bueso2012-09-27 09:50:27 +0200
committerKarel Zak2012-09-27 13:38:14 +0200
commit766d5156c43b784700d28d1c1141008b2bf35ed7 (patch)
tree18fb6ef0dde41c5152369a973c71bb4349e0b659 /fdisks/Makemodule.am
parentfdisk: cleanup debug messages and comments (diff)
downloadkernel-qcow2-util-linux-766d5156c43b784700d28d1c1141008b2bf35ed7.tar.gz
kernel-qcow2-util-linux-766d5156c43b784700d28d1c1141008b2bf35ed7.tar.xz
kernel-qcow2-util-linux-766d5156c43b784700d28d1c1141008b2bf35ed7.zip
fdisk: add GPT support
This patch allows fdisk to handle GUID partition tables, based on the latest UEFI specifications version 2.3.1, from June 27th, 2012. The following operations are supported: - Probing (detects both protective and hybrid MBRs) - Writing to disk - Listing used partitions - Adding partitions - Deleting partitions - Data integrity verifications (for both headers and partitions). A few considerations: - Currently we do not fix invalid primary headers -- we just abort! - Header checksums are updated upon every change (ie: add/delete partitions), this allows us to mathematically verify the changes on-the-fly, and not only when writing to disk, like most other related tools do. - We are extremly picky when writing to disk, any error aborts the opeartion. - When creating a new partition, the following GUIDs are available: http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs For test cases, the gpt.img from libblkid tests, scsi_debug and my own hard drive (/dev/sda) were used. For the image, all operations were tested successfully, and for /dev/sda all except write, which was not tested - hey, I'm not suicidal! [kzak@redhat.com: - add get/set partition type functions - use unified on strings based table for partition types - add partition type to table list function] Tested-and-reviewed-by: Petr Uzel <petr.uzel@suse.cz> Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/Makemodule.am')
-rw-r--r--fdisks/Makemodule.am21
1 files changed, 12 insertions, 9 deletions
diff --git a/fdisks/Makemodule.am b/fdisks/Makemodule.am
index 26b47b0a7..0723f507f 100644
--- a/fdisks/Makemodule.am
+++ b/fdisks/Makemodule.am
@@ -1,9 +1,4 @@
-fdisk_common_sources = \
- fdisks/common.h \
- fdisks/gpt.c \
- fdisks/gpt.h
-
if !ARCH_M68K
sbin_PROGRAMS += fdisk
@@ -24,16 +19,24 @@ fdisk_SOURCES = \
fdisks/fdisksunlabel.h \
fdisks/fdiskdoslabel.c \
fdisks/fdiskdoslabel.h \
+ fdisks/gpt.c \
+ fdisks/gpt.h \
fdisks/partname.c \
- $(fdisk_common_sources)
+ fdisks/common.h
fdisk_LDADD = $(LDADD) libcommon.la
+fdisk_CFLAGS = $(AM_CFLAGS)
if BUILD_LIBBLKID
-fdisk_CFLAGS = -I$(ul_libblkid_incdir)
+fdisk_CFLAGS += -I$(ul_libblkid_incdir)
fdisk_LDADD += libblkid.la
endif
+if BUILD_LIBUUID
+fdisk_CFLAGS += -I$(ul_libuuid_incdir)
+fdisk_LDADD += libuuid.la
+endif
+
if HAVE_STATIC_FDISK
sbin_PROGRAMS += fdisk.static
fdisk_static_SOURCES = $(fdisk_SOURCES)
@@ -50,7 +53,7 @@ dist_man_MANS += fdisks/sfdisk.8
sfdisk_SOURCES = \
fdisks/partname.c \
fdisks/sfdisk.c \
- $(fdisk_common_sources)
+ fdisks/common.h
sfdisk_LDADD = $(LDADD) libcommon.la
if HAVE_STATIC_SFDISK
@@ -64,7 +67,7 @@ endif
if BUILD_CFDISK
sbin_PROGRAMS += cfdisk
dist_man_MANS += fdisks/cfdisk.8
-cfdisk_SOURCES = fdisks/cfdisk.c $(fdisk_common_sources)
+cfdisk_SOURCES = fdisks/cfdisk.c fdisks/common.h
cfdisk_CFLAGS =
cfdisk_LDADD = $(LDADD) libcommon.la