[syslinux] [PATCH] mboot: set boot loader name

Sebastian Herbszt herbszt at gmx.de
Sun Mar 21 09:27:00 PDT 2010


Set a pointer to syslinux_version()->version_string in mbinfo.

Signed-off-by: Sebastian Herbszt <herbszt at gmx.de>

diff --git a/com32/mboot/mboot.c b/com32/mboot/mboot.c
index 8425e06..76ef7a0 100644
--- a/com32/mboot/mboot.c
+++ b/com32/mboot/mboot.c
@@ -222,6 +222,13 @@ int main(int argc, char *argv[])
     /* Add auxilliary information */
     mboot_make_memmap();
     mboot_apm();
+
+    /* Set boot loader name */
+    const struct syslinux_version *sv;
+    sv = syslinux_version();
+    mbinfo.boot_loader_name = (uint32_t)sv->version_string;
+    mbinfo.flags |= MB_INFO_BOOT_LOADER_NAME;
+
     if (opt.solaris)
 	mboot_solaris_dhcp_hack();
 
diff --git a/com32/mboot/mboot.h b/com32/mboot/mboot.h
index 993b31a..4238333 100644
--- a/com32/mboot/mboot.h
+++ b/com32/mboot/mboot.h
@@ -50,6 +50,7 @@
 #include <syslinux/loadfile.h>
 #include <syslinux/movebits.h>
 #include <syslinux/bootpm.h>
+#include <syslinux/config.h>
 
 #include "mb_header.h"
 #include "mb_info.h"




More information about the Syslinux mailing list