]> git.ipfire.org Git - thirdparty/util-linux.git/blob - disk-utils/fdisk.h
Merge branch 'meson-more-build-options' of https://github.com/jwillikers/util-linux
[thirdparty/util-linux.git] / disk-utils / fdisk.h
1 #ifndef UTIL_LINUX_FDISK_H
2 #define UTIL_LINUX_FDISK_H
3 /*
4 * fdisk.h
5 */
6
7 #include "c.h"
8 #include <assert.h>
9 #include <libfdisk.h>
10
11 /* Let's temporary include private libfdisk header file. The final libfdisk.h
12 * maybe included when fdisk.c and libfdisk code will be completely spit.
13 */
14 #include "blkdev.h"
15 #include "colors.h"
16 #include "debug.h"
17 #include "nls.h"
18
19 #include "fdisk-list.h"
20
21 #define FDISKPROG_DEBUG_INIT (1 << 1)
22 #define FDISKPROG_DEBUG_MENU (1 << 3)
23 #define FDISKPROG_DEBUG_MISC (1 << 4)
24 #define FDISKPROG_DEBUG_ASK (1 << 5)
25 #define FDISKPROG_DEBUG_ALL 0xFFFF
26
27 extern int pwipemode;
28 extern struct fdisk_table *original_layout;
29 extern int device_is_used;
30 extern int is_interactive;
31
32 UL_DEBUG_DECLARE_MASK(fdisk);
33 #define DBG(m, x) __UL_DBG(fdisk, FDISKPROG_DEBUG_, m, x)
34 #define ON_DBG(m, x) __UL_DBG_CALL(fdisk, FDISKPROG_DEBUG_, m, x)
35
36 extern int get_user_reply(const char *prompt,
37 char *buf, size_t bufsz);
38 extern int process_fdisk_menu(struct fdisk_context **cxt);
39
40 extern int ask_callback(struct fdisk_context *cxt, struct fdisk_ask *ask,
41 void *data __attribute__((__unused__)));
42
43 extern int print_partition_info(struct fdisk_context *cxt);
44
45 /* prototypes for fdisk.c */
46 extern void dump_firstsector(struct fdisk_context *cxt);
47 extern void dump_disklabel(struct fdisk_context *cxt);
48
49 extern void list_partition_types(struct fdisk_context *cxt);
50 extern void change_partition_type(struct fdisk_context *cxt);
51
52 extern void toggle_dos_compatibility_flag(struct fdisk_context *cxt);
53
54 extern void follow_wipe_mode(struct fdisk_context *cxt);
55
56 #endif /* UTIL_LINUX_FDISK_H */