]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (gpt) move code from fdisk to libfdisk
authorKarel Zak <kzak@redhat.com>
Tue, 22 Jan 2013 13:02:22 +0000 (14:02 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 11 Mar 2013 11:56:21 +0000 (12:56 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/Makemodule.am
fdisks/fdisk.c
fdisks/gpt.h [deleted file]
libfdisk/src/Makemodule.am
libfdisk/src/fdiskP.h
libfdisk/src/gpt.c [moved from fdisks/gpt.c with 99% similarity]

index 442d4bf0c634900c15f36d47a57b0d46a6f107c0..dcb48e52f0241282b183824299f535371b2c56fe 100644 (file)
@@ -19,8 +19,6 @@ fdisk_SOURCES = \
        fdisks/fdisksgilabel.h \
        fdisks/fdisksunlabel.c \
        fdisks/fdisksunlabel.h \
-       fdisks/gpt.c \
-       fdisks/gpt.h \
        fdisks/partname.c \
        fdisks/common.h
 
index 62ecdf4a99de5ce2e6e7114ef08b193f970cfd91..d091a5d5178f3d849a3d4a152abf837466eb15d0 100644 (file)
@@ -49,9 +49,6 @@
 #include <linux/blkpg.h>
 #endif
 
-#include "gpt.h"
-
-
 /* menu list description */
 
 struct menulist_descr {
diff --git a/fdisks/gpt.h b/fdisks/gpt.h
deleted file mode 100644 (file)
index 645a014..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef FDISK_GPT_H
-#define FDISK_GPT_H
-
-extern void gpt_list_table(struct fdisk_context *cxt, int xtra);
-
-#endif /* FDISK_GPT_H */
index 4f9048e90a658a41ca2dca34b978c3803f0690da..20d4e4e6609b892579e8ada5664e14f3d9476af3 100644 (file)
@@ -13,7 +13,8 @@ libfdisk_la_SOURCES = \
        libfdisk/src/label.c \
        libfdisk/src/utils.c \
        libfdisk/src/context.c \
-       libfdisk/src/parttype.c
+       libfdisk/src/parttype.c \
+       libfdisk/src/gpt.c
 
 
 nodist_libfdisk_la_SOURCES = libfdisk/src/fdiskP.h
index 3a5ab4a7ebed148241235791eb3090b9f73a9649..bf392118223cc6cf8cc8a421a4f19f5662a56a57 100644 (file)
@@ -251,4 +251,8 @@ extern int fdisk_read_firstsector(struct fdisk_context *cxt);
 extern int fdisk_probe_labels(struct fdisk_context *cxt);
 extern void fdisk_deinit_label(struct fdisk_label *lb);
 
+
+/* gpt.c -- temporary bypass library API... */
+extern void gpt_list_table(struct fdisk_context *cxt, int xtra);
+
 #endif /* _LIBFDISK_PRIVATE_H */
similarity index 99%
rename from fdisks/gpt.c
rename to libfdisk/src/gpt.c
index 3a9f5418175c6b3cf313d63aa578155d228e3a60..03fad41efca265eee79894a16024104f12b419f5 100644 (file)
 #include <ctype.h>
 #include <uuid.h>
 
+#include "fdiskP.h"
+
 #include "nls.h"
 #include "xalloc.h"
-#include "common.h"
-#include "fdisk.h"
 #include "crc32.h"
-#include "gpt.h"
 #include "blkdev.h"
 #include "bitops.h"
 #include "strutils.h"
 #include "all-io.h"
 
+/* temporary -- exported from fdisk/sfdisk.c
+ * TODO: use fdisk_dialog API
+ */
+extern unsigned int read_int(struct fdisk_context *cxt,
+                       unsigned int low, unsigned int dflt,
+                       unsigned int high, unsigned int base, char *mesg);
+
+extern unsigned int read_int_with_suffix(struct fdisk_context *cxt,
+                       unsigned int low, unsigned int dflt, unsigned int high,
+                       unsigned int base, char *mesg, int *is_suffix_used);
+
 #define GPT_HEADER_SIGNATURE 0x5452415020494645LL /* EFI PART */
 #define GPT_HEADER_REVISION_V1_02 0x00010200
 #define GPT_HEADER_REVISION_V1_00 0x00010000