diff options
author | Pierre-Alexandre Meyer <pierre@mouraf.org> | 2009-08-26 21:31:32 -0700 |
---|---|---|
committer | Pierre-Alexandre Meyer <pierre@mouraf.org> | 2009-08-26 21:31:32 -0700 |
commit | 03b2384b6e9f54d9697e87d2a19c321e6fd96ed5 (patch) | |
tree | 35fcd3698baa2a333cbf2b7684a0e8b75888edcb | |
parent | fa0b7fbee68bcc8f496210f540a231b8b5a19455 (diff) | |
download | syslinux-03b2384b6e9f54d9697e87d2a19c321e6fd96ed5.tar.gz |
hdt: add bootloader detection (menu)
Print the bootloader ID in the partition submenu if we recognize it.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
-rw-r--r-- | com32/hdt/hdt-menu-disk.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/com32/hdt/hdt-menu-disk.c b/com32/hdt/hdt-menu-disk.c index 1b0f40dd..d711094c 100644 --- a/com32/hdt/hdt-menu-disk.c +++ b/com32/hdt/hdt-menu-disk.c @@ -28,6 +28,7 @@ #include <stdlib.h> #include <disk/errno_disk.h> +#include <disk/bootloaders.h> #include <disk/mbrs.h> #include <disk/geom.h> #include <disk/read.h> @@ -82,6 +83,7 @@ static void compute_partition_information(struct driveinfo *drive_info, int nb_partitions_seen) { char size[9]; + char bootloader_name[9]; char *parttype; unsigned int start, end; char buffer[SUBMENULEN+1]; @@ -121,6 +123,14 @@ static void compute_partition_information(struct driveinfo *drive_info, parttype); add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); + if (get_bootloader_string(drive_info, ptab, bootloader_name, 9) == 0) { + snprintf(buffer, sizeof buffer, "Bootloader : %s", + bootloader_name); + snprintf(statbuffer, sizeof statbuffer, "Bootloader: %s", + bootloader_name); + add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); + } + snprintf(buffer, sizeof buffer, "Bootable : %s", (ptab->active_flag == 0x80) ? "Yes" : "No"); snprintf(statbuffer, sizeof statbuffer, "Bootable: %s", |