2013-08-30 03:46:37 -05:00
|
|
|
#ifndef UTIL_LINUX_FDISK_H
|
|
|
|
#define UTIL_LINUX_FDISK_H
|
2006-12-06 17:25:33 -06:00
|
|
|
/*
|
2014-08-15 05:38:02 -05:00
|
|
|
* fdisk.h
|
|
|
|
*/
|
2006-12-06 17:25:33 -06:00
|
|
|
|
2009-10-15 18:26:46 -05:00
|
|
|
#include "c.h"
|
2014-08-15 05:38:02 -05:00
|
|
|
#include <assert.h>
|
|
|
|
#include <libfdisk.h>
|
2009-10-15 18:26:46 -05:00
|
|
|
|
2012-11-30 08:29:03 -06:00
|
|
|
/* Let's temporary include private libfdisk header file. The final libfdisk.h
|
|
|
|
* maybe included when fdisk.c and libfdisk code will be completely spit.
|
|
|
|
*/
|
2013-06-25 09:14:23 -05:00
|
|
|
#include "blkdev.h"
|
2013-09-02 03:54:30 -05:00
|
|
|
#include "colors.h"
|
2014-08-15 05:38:02 -05:00
|
|
|
#include "debug.h"
|
|
|
|
#include "nls.h"
|
|
|
|
|
2014-09-04 05:07:44 -05:00
|
|
|
#include "fdisk-list.h"
|
|
|
|
|
2014-08-15 05:38:02 -05:00
|
|
|
#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
|
|
|
|
|
2016-05-04 05:43:35 -05:00
|
|
|
extern int pwipemode;
|
2017-07-14 04:08:54 -05:00
|
|
|
extern struct fdisk_table *original_layout;
|
|
|
|
extern int device_is_used;
|
2017-08-24 08:37:16 -05:00
|
|
|
extern int is_interactive;
|
2016-05-04 05:43:35 -05:00
|
|
|
|
2014-08-15 05:38:02 -05:00
|
|
|
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)
|
2012-11-30 08:29:03 -06:00
|
|
|
|
2017-08-24 08:37:16 -05:00
|
|
|
extern int get_user_reply(const char *prompt,
|
2013-05-21 08:06:11 -05:00
|
|
|
char *buf, size_t bufsz);
|
2013-07-10 07:17:58 -05:00
|
|
|
extern int process_fdisk_menu(struct fdisk_context **cxt);
|
2013-05-17 08:11:11 -05:00
|
|
|
|
2013-01-28 09:16:11 -06:00
|
|
|
extern int ask_callback(struct fdisk_context *cxt, struct fdisk_ask *ask,
|
|
|
|
void *data __attribute__((__unused__)));
|
|
|
|
|
2015-05-09 16:15:23 -05:00
|
|
|
extern int print_partition_info(struct fdisk_context *cxt);
|
|
|
|
|
2006-12-06 17:25:33 -06:00
|
|
|
/* prototypes for fdisk.c */
|
2013-09-03 10:36:35 -05:00
|
|
|
extern void dump_firstsector(struct fdisk_context *cxt);
|
|
|
|
extern void dump_disklabel(struct fdisk_context *cxt);
|
|
|
|
|
2012-09-24 06:24:09 -05:00
|
|
|
extern void list_partition_types(struct fdisk_context *cxt);
|
2013-08-30 03:46:37 -05:00
|
|
|
extern void change_partition_type(struct fdisk_context *cxt);
|
2006-12-06 17:25:43 -06:00
|
|
|
|
2013-06-25 08:55:02 -05:00
|
|
|
extern void toggle_dos_compatibility_flag(struct fdisk_context *cxt);
|
2006-12-06 17:25:39 -06:00
|
|
|
|
2017-02-14 08:11:35 -06:00
|
|
|
extern void follow_wipe_mode(struct fdisk_context *cxt);
|
|
|
|
|
2013-08-30 03:46:37 -05:00
|
|
|
#endif /* UTIL_LINUX_FDISK_H */
|