2006-12-06 17:25:33 -06:00
|
|
|
/*
|
|
|
|
fdisk.h
|
|
|
|
*/
|
|
|
|
|
2009-10-15 18:26:46 -05:00
|
|
|
#include "c.h"
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
#include "fdiskP.h"
|
2013-06-25 09:14:23 -05:00
|
|
|
#include "blkdev.h"
|
2012-11-30 08:29:03 -06:00
|
|
|
|
|
|
|
|
2013-02-11 09:38:20 -06:00
|
|
|
extern void toggle_units(struct fdisk_context *cxt);
|
|
|
|
|
|
|
|
static inline unsigned long
|
|
|
|
scround(struct fdisk_context *cxt, unsigned long num)
|
|
|
|
{
|
|
|
|
unsigned long un = fdisk_context_get_units_per_sector(cxt);
|
|
|
|
return (num + un - 1) / un;
|
|
|
|
}
|
2006-12-06 17:25:33 -06:00
|
|
|
|
2006-12-06 17:25:35 -06:00
|
|
|
|
2013-05-21 08:06:11 -05:00
|
|
|
extern int get_user_reply(struct fdisk_context *cxt,
|
|
|
|
const char *prompt,
|
|
|
|
char *buf, size_t bufsz);
|
2013-05-17 08:11:11 -05:00
|
|
|
extern int print_fdisk_menu(struct fdisk_context *cxt);
|
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__)));
|
|
|
|
|
2006-12-06 17:25:33 -06:00
|
|
|
/* prototypes for fdisk.c */
|
2012-09-24 06:24:09 -05:00
|
|
|
extern void list_partition_types(struct fdisk_context *cxt);
|
2013-06-12 10:09:28 -05:00
|
|
|
extern struct fdisk_parttype *ask_partition_type(struct fdisk_context *cxt);
|
2012-05-27 14:44:04 -05:00
|
|
|
extern void reread_partition_table(struct fdisk_context *cxt, int leave);
|
2006-12-06 17:25:43 -06:00
|
|
|
|
2012-09-24 04:30:26 -05:00
|
|
|
extern char *partition_type(struct fdisk_context *cxt, unsigned char type);
|
2012-06-17 11:10:33 -05:00
|
|
|
extern int warn_geometry(struct fdisk_context *cxt);
|
2013-06-25 08:55:02 -05:00
|
|
|
extern void toggle_dos_compatibility_flag(struct fdisk_context *cxt);
|
2012-06-03 13:15:17 -05:00
|
|
|
extern void warn_limits(struct fdisk_context *cxt);
|
2006-12-06 17:25:39 -06:00
|
|
|
|