summaryrefslogtreecommitdiffstats
path: root/disk-utils/fdisk.h
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:25:33 +0100
committerKarel Zak2006-12-07 00:25:33 +0100
commit726f69e29ca9d4842f3acb20fffd2466fda62c09 (patch)
treeabbc1b6e9bfb0dfe32e81a83648e261ccb2d5a5f /disk-utils/fdisk.h
parentImported from util-linux-2.2 tarball. (diff)
downloadkernel-qcow2-util-linux-726f69e29ca9d4842f3acb20fffd2466fda62c09.tar.gz
kernel-qcow2-util-linux-726f69e29ca9d4842f3acb20fffd2466fda62c09.tar.xz
kernel-qcow2-util-linux-726f69e29ca9d4842f3acb20fffd2466fda62c09.zip
Imported from util-linux-2.5 tarball.
Diffstat (limited to 'disk-utils/fdisk.h')
-rw-r--r--disk-utils/fdisk.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/disk-utils/fdisk.h b/disk-utils/fdisk.h
new file mode 100644
index 000000000..4f23fd8a3
--- /dev/null
+++ b/disk-utils/fdisk.h
@@ -0,0 +1,47 @@
+/*
+ fdisk.h
+*/
+
+#define SECTOR_SIZE 512
+#define NETBSD_PARTITION 0xa5
+#define cround(n) (((n) + display_factor * unit_flag) / display_factor)
+
+#if defined(__GNUC__) || defined(HAS_LONG_LONG)
+typedef long long ext2_loff_t;
+#else
+typedef long ext2_loff_t;
+#endif
+
+extern ext2_loff_t ext2_llseek(unsigned int fd,
+ ext2_loff_t offset,
+ unsigned int origin);
+
+enum failure {usage, unable_to_open, unable_to_read, unable_to_seek,
+ unable_to_write, out_of_memory};
+
+enum offset {ignore, lower, deflt, upper};
+
+struct systypes {
+ unsigned char index;
+ char *name;
+};
+
+/* prototypes for fdisk.c */
+extern char *disk_device,
+ *line_ptr;
+extern int fd,
+ partitions;
+extern uint unit_flag,
+ display_factor;
+extern struct partition *part_table[];
+extern void fatal(enum failure why);
+extern int get_partition(int warn, int max);
+extern void list_types(struct systypes *sys, int size);
+extern int read_line (void);
+extern char read_char(char *mesg);
+extern int read_hex(struct systypes *sys, int size);
+uint read_int(uint low, uint dflt, uint high, enum offset base, char *mesg);
+extern char *const str_units(void);
+
+/* prototypes for fdisklabel.c */
+extern void bselect(void);