summaryrefslogtreecommitdiffstats
path: root/disk-utils/fdisk.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 13:14:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 13:14:44 +0000
commit30ff6afe596eddafacf22b1a5b2d1a3d6254ea15 (patch)
tree9b788335f92174baf7ee18f03ca8330b8c19ce2b /disk-utils/fdisk.h
parentInitial commit. (diff)
downloadutil-linux-30ff6afe596eddafacf22b1a5b2d1a3d6254ea15.tar.xz
util-linux-30ff6afe596eddafacf22b1a5b2d1a3d6254ea15.zip
Adding upstream version 2.36.1.upstream/2.36.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'disk-utils/fdisk.h')
-rw-r--r--disk-utils/fdisk.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/disk-utils/fdisk.h b/disk-utils/fdisk.h
new file mode 100644
index 0000000..e1147e2
--- /dev/null
+++ b/disk-utils/fdisk.h
@@ -0,0 +1,56 @@
+#ifndef UTIL_LINUX_FDISK_H
+#define UTIL_LINUX_FDISK_H
+/*
+ * fdisk.h
+ */
+
+#include "c.h"
+#include <assert.h>
+#include <libfdisk.h>
+
+/* Let's temporary include private libfdisk header file. The final libfdisk.h
+ * maybe included when fdisk.c and libfdisk code will be completely spit.
+ */
+#include "blkdev.h"
+#include "colors.h"
+#include "debug.h"
+#include "nls.h"
+
+#include "fdisk-list.h"
+
+#define FDISKPROG_DEBUG_INIT (1 << 1)
+#define FDISKPROG_DEBUG_MENU (1 << 3)
+#define FDISKPROG_DEBUG_MISC (1 << 4)
+#define FDISKPROG_DEBUG_ASK (1 << 5)
+#define FDISKPROG_DEBUG_ALL 0xFFFF
+
+extern int pwipemode;
+extern struct fdisk_table *original_layout;
+extern int device_is_used;
+extern int is_interactive;
+
+UL_DEBUG_DECLARE_MASK(fdisk);
+#define DBG(m, x) __UL_DBG(fdisk, FDISKPROG_DEBUG_, m, x)
+#define ON_DBG(m, x) __UL_DBG_CALL(fdisk, FDISKPROG_DEBUG_, m, x)
+
+extern int get_user_reply(const char *prompt,
+ char *buf, size_t bufsz);
+extern int process_fdisk_menu(struct fdisk_context **cxt);
+
+extern int ask_callback(struct fdisk_context *cxt, struct fdisk_ask *ask,
+ void *data __attribute__((__unused__)));
+
+extern int print_partition_info(struct fdisk_context *cxt);
+
+/* prototypes for fdisk.c */
+extern void dump_firstsector(struct fdisk_context *cxt);
+extern void dump_disklabel(struct fdisk_context *cxt);
+
+extern void list_partition_types(struct fdisk_context *cxt);
+extern void change_partition_type(struct fdisk_context *cxt);
+
+extern void toggle_dos_compatibility_flag(struct fdisk_context *cxt);
+
+extern void follow_wipe_mode(struct fdisk_context *cxt);
+
+#endif /* UTIL_LINUX_FDISK_H */