aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-23 10:22:06 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-08-23 10:22:06 -0700
commitdebd96ee67daff43628e177368eba0f49c2fedee (patch)
treeb9bc3cac24f3419bc8f7fa67b3048630657b38f7
parent9f42921795542e310b54c5679083c8251d469617 (diff)
downloadsyslinux-debd96ee67daff43628e177368eba0f49c2fedee.tar.gz
syslinux-debd96ee67daff43628e177368eba0f49c2fedee.tar.xz
syslinux-debd96ee67daff43628e177368eba0f49c2fedee.zip
hdt: detect bootloader ids when probing disks
Add a bootloader_ids[] array in the hardware structure to store bootloader ids when probing the disks. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
-rw-r--r--com32/hdt/hdt-common.c4
-rw-r--r--com32/hdt/hdt-common.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/com32/hdt/hdt-common.c b/com32/hdt/hdt-common.c
index 80305a3e..bfb480ca 100644
--- a/com32/hdt/hdt-common.c
+++ b/com32/hdt/hdt-common.c
@@ -35,6 +35,7 @@
#include "hdt-common.h"
#include "lib-ansi.h"
#include <disk/util.h>
+#include <disk/bootloaders.h>
/* ISOlinux requires a 8.3 format */
void convert_isolinux_filename(char *filename, struct s_hardware *hardware) {
@@ -269,6 +270,9 @@ void detect_disks(struct s_hardware *hardware)
if (err == -1 || !hardware->disk_info[i].cbios)
continue;
+ /* Detect bootloader */
+ hardware->bootloader_ids[i] = get_bootloader_id(&hardware->disk_info[i]);
+
hardware->disks_count++;
}
}
diff --git a/com32/hdt/hdt-common.h b/com32/hdt/hdt-common.h
index 2b67f9ca..07fca074 100644
--- a/com32/hdt/hdt-common.h
+++ b/com32/hdt/hdt-common.h
@@ -114,6 +114,7 @@ struct s_hardware {
s_vpd vpd; /* VPD information */
struct pci_domain *pci_domain; /* PCI Devices */
struct driveinfo disk_info[256]; /* Disk Information */
+ int bootloader_ids[256]; /* Bootloader ids in the MBRs */
int disks_count; /* Number of detected disks */
struct s_pxe pxe;
struct s_vesa vesa;