From b5bae80bb550fa48ef3c119891b337337434ec82056c41e5a7e044b879854834 Mon Sep 17 00:00:00 2001 From: Steffen Winterfeldt Date: Wed, 20 Apr 2011 09:28:59 +0000 Subject: [PATCH] - adrian: mboot: replicate BOOTIF option for all modules OBS-URL: https://build.opensuse.org/package/show/system:install:head/syslinux?expand=0&rev=29 --- syslinux-4.04-mboot_bootif.diff | 39 +++++++++++++++++++++++++++++++++ syslinux.changes | 5 +++++ syslinux.spec | 2 ++ 3 files changed, 46 insertions(+) create mode 100644 syslinux-4.04-mboot_bootif.diff diff --git a/syslinux-4.04-mboot_bootif.diff b/syslinux-4.04-mboot_bootif.diff new file mode 100644 index 0000000..e476901 --- /dev/null +++ b/syslinux-4.04-mboot_bootif.diff @@ -0,0 +1,39 @@ +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++; diff --git a/syslinux.changes b/syslinux.changes index 86250b1..d490502 100644 --- a/syslinux.changes +++ b/syslinux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 20 11:27:23 CEST 2011 - snwint@suse.de + +- adrian: mboot: replicate BOOTIF option for all modules + ------------------------------------------------------------------- Tue Apr 19 15:29:10 CEST 2011 - snwint@suse.de diff --git a/syslinux.spec b/syslinux.spec index 5dd915a..507a9bb 100644 --- a/syslinux.spec +++ b/syslinux.spec @@ -34,6 +34,7 @@ Source2: README.gfxboot Patch0: %{name}-%{version}-iso9660.diff Patch1: %{name}-%{version}-cwd.diff Patch2: %{name}-%{version}-noinitrd.diff +Patch3: %{name}-%{version}-mboot_bootif.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -53,6 +54,7 @@ Authors: %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build cp %{SOURCE2} .