Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37809265
en ru br
ALT Linux repos
S:4.04-alt19
D:3.61-alt1
5.0: 3.63-alt3
4.1: 3.36-alt2
4.0: 3.36-alt2
3.0: 2.11-alt1

Group :: System/Kernel and hardware
RPM: syslinux

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: syslinux-4.04-mboot_bootif.diff
Download


diff --git a/com32/mboot/mboot.c b/com32/mboot/mboot.c
index 35450e0..a124a21 100644
--- a/com32/mboot/mboot.c
+++ b/com32/mboot/mboot.c
@@ -97,9 +97,14 @@ static int get_modules(char **argv, struct module_data **mdp)
     int arglen;
     const char module_separator[] = "---";
 
+    char *bootif = 0;
     for (argp = argv; *argp; argp++) {
 	if (!strcmp(*argp, module_separator))
 	    module_count++;
+        /* BOOTIF= gets only appended for last group by syslinux, but it may be needed also
+           for other modules. So let's copy it. Esp. needed for XEN booting, Dom0 kernel needs it */
+        if (!strncmp(*argp, "BOOTIF=", 7))
+            bootif = *argp;
     }
 
     *mdp = mp = malloc(module_count * sizeof(struct module_data));
@@ -133,11 +138,19 @@ static int get_modules(char **argv, struct module_data **mdp)
 	    mp->cmdline = strdup("");
 	} else {
 	    char *p;
+            if (bootif) {
+              arglen += strlen(bootif) + 1;
+            }
+
 	    mp->cmdline = p = malloc(arglen);
 	    for (; *argp && strcmp(*argp, module_separator); argp++) {
 		p = stpcpy(p, *argp);
 		*p++ = ' ';
 	    }
+            if (bootif) {
+	      p = stpcpy(p, bootif);
+	      *p++ = ' ';
+            }
 	    *--p = '\0';
 	}
 	mp++;
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin