aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude/disk
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-04-19 21:09:21 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-04-19 21:13:14 -0700
commitcdddfb9f7db5fc1d28fbdd3229823bb912c49c4d (patch)
treec60e5d3ff2acfa2dd2e1a84b7bba872ea17ea660 /com32/gplinclude/disk
parent8f67b34b0b99fbae6264dc0a34331d557e674b86 (diff)
downloadsyslinux-cdddfb9f7db5fc1d28fbdd3229823bb912c49c4d.tar.gz
syslinux-cdddfb9f7db5fc1d28fbdd3229823bb912c49c4d.tar.xz
syslinux-cdddfb9f7db5fc1d28fbdd3229823bb912c49c4d.zip
gpllib: Add partition table structure (disk)
Impact: disk API extension Add part_entry structure to describe DOS partition tables. The new get_label call translates a label id to a meaningful string describing the partition. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/gplinclude/disk')
-rw-r--r--com32/gplinclude/disk/util.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/com32/gplinclude/disk/util.h b/com32/gplinclude/disk/util.h
index 5a76e0c4..b6cb1850 100644
--- a/com32/gplinclude/disk/util.h
+++ b/com32/gplinclude/disk/util.h
@@ -3,7 +3,23 @@
#include <com32.h>
+#define PARTITION_TABLES_OFFSET 0x1be
+/* A DOS partition table entry */
+struct part_entry {
+ uint8_t active_flag; /* 0x80 if "active" */
+ uint8_t start_head;
+ uint8_t start_sect;
+ uint8_t start_cyl;
+ uint8_t ostype;
+ uint8_t end_head;
+ uint8_t end_sect;
+ uint8_t end_cyl;
+ uint32_t start_lba;
+ uint32_t length;
+} __attribute__((packed));
+
int int13_retry(const com32sys_t *inreg, com32sys_t *outreg);
void get_error(const int, char**);
+void get_label(int label, char** buffer_label);
#endif /* _UTIL_H_ */