From 2d8c0d85e4aad1c470a2d0f835036d588735711d Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 14 May 2010 21:13:14 +0000 Subject: [PATCH] -Patch to allow primarynic autodetect on stateless esxi Former-commit-id: 9eab9bac8651ecf6667e31a7a04dc84ccfbab019 --- syslinux/syslinux-3.86-multibootif.patch | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 syslinux/syslinux-3.86-multibootif.patch diff --git a/syslinux/syslinux-3.86-multibootif.patch b/syslinux/syslinux-3.86-multibootif.patch new file mode 100644 index 0000000..38b1528 --- /dev/null +++ b/syslinux/syslinux-3.86-multibootif.patch @@ -0,0 +1,56 @@ +diff -urN syslinux-3.86/com32/mboot/mboot.c syslinux-3.86-multibootif/com32/mboot/mboot.c +--- syslinux-3.86/com32/mboot/mboot.c 2010-03-31 12:24:25.000000000 -0400 ++++ syslinux-3.86-multibootif/com32/mboot/mboot.c 2010-05-14 17:08:13.898848924 -0400 +@@ -93,9 +93,18 @@ + char **argp, **argx; + struct module_data *mp; + int rv; ++ int firstmod = 1; + int module_count = 1; + int arglen; + const char module_separator[] = "---"; ++ com32sys_t reg; ++ char *bootifstr; ++ reg.eax.w[0] = 0x000f; /* Get IPAPPEND strings */ ++ __intcall(0x22,®,®); ++ if (!(reg.eflags.l & EFLAGS_CF)) { ++ bootifstr = MK_PTR(reg.es, ++ *(uint16_t *) MK_PTR(reg.es, reg.ebx.w[0] + 2)); ++ } + + for (argp = argv; *argp; argp++) { + if (!strcmp(*argp, module_separator)) +@@ -128,9 +137,17 @@ + arglen = 0; + for (argx = argp; *argx && strcmp(*argx, module_separator); argx++) + arglen += strlen(*argx) + 1; ++ if (firstmod) { ++ arglen += strlen(bootifstr) + 1; ++ } + + if (arglen == 0) { +- mp->cmdline = strdup(""); ++ if (firstmod) { /* first module, let's add BOOTIF for fun */ ++ firstmod=0; ++ mp->cmdline = strdup(bootifstr); ++ } else { ++ mp->cmdline = strdup(""); ++ } + } else { + char *p; + mp->cmdline = p = malloc(arglen); +@@ -138,7 +155,13 @@ + p = strpcpy(p, *argp); + *p++ = ' '; + } +- *--p = '\0'; ++ if (firstmod) { /* first module, let's add BOOTIF for fun */ ++ firstmod=0; ++ p = strpcpy(p,bootifstr); ++ *p = '\0'; ++ } else { ++ *--p = '\0'; ++ } + } + mp++; + if (*argp)