2006-12-07 00:25:33 +01:00
|
|
|
/*
|
|
|
|
fdisk.h
|
|
|
|
*/
|
|
|
|
|
2009-10-16 01:26:46 +02:00
|
|
|
#include "c.h"
|
|
|
|
|
2012-11-30 15:29:03 +01: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 16:14:23 +02:00
|
|
|
#include "blkdev.h"
|
2012-11-30 15:29:03 +01:00
|
|
|
|
|
|
|
|
2013-02-11 16:38:20 +01: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-07 00:25:33 +01:00
|
|
|
|
2006-12-07 00:25:35 +01:00
|
|
|
|
2013-05-21 15:06:11 +02:00
|
|
|
extern int get_user_reply(struct fdisk_context *cxt,
|
|
|
|
const char *prompt,
|
|
|
|
char *buf, size_t bufsz);
|
2013-05-17 15:11:11 +02:00
|
|
|
extern int print_fdisk_menu(struct fdisk_context *cxt);
|
2013-07-10 14:17:58 +02:00
|
|
|
extern int process_fdisk_menu(struct fdisk_context **cxt);
|
2013-05-17 15:11:11 +02:00
|
|
|
|
2013-01-28 16:16:11 +01:00
|
|
|
extern int ask_callback(struct fdisk_context *cxt, struct fdisk_ask *ask,
|
|
|
|
void *data __attribute__((__unused__)));
|
|
|
|
|
2006-12-07 00:25:33 +01:00
|
|
|
/* prototypes for fdisk.c */
|
2012-09-24 13:24:09 +02:00
|
|
|
extern void list_partition_types(struct fdisk_context *cxt);
|
2013-06-12 17:09:28 +02:00
|
|
|
extern struct fdisk_parttype *ask_partition_type(struct fdisk_context *cxt);
|
2012-05-27 21:44:04 +02:00
|
|
|
extern void reread_partition_table(struct fdisk_context *cxt, int leave);
|
2006-12-07 00:25:43 +01:00
|
|
|
|
2012-09-24 11:30:26 +02:00
|
|
|
extern char *partition_type(struct fdisk_context *cxt, unsigned char type);
|
2012-06-17 18:10:33 +02:00
|
|
|
extern int warn_geometry(struct fdisk_context *cxt);
|
2013-06-25 15:55:02 +02:00
|
|
|
extern void toggle_dos_compatibility_flag(struct fdisk_context *cxt);
|
2012-06-03 20:15:17 +02:00
|
|
|
extern void warn_limits(struct fdisk_context *cxt);
|
2006-12-07 00:25:39 +01:00
|
|
|
|