- adrian: mboot: replicate BOOTIF option for all modules

OBS-URL: https://build.opensuse.org/package/show/system:install:head/syslinux?expand=0&rev=29
This commit is contained in:
Steffen Winterfeldt 2011-04-20 09:28:59 +00:00 committed by Git OBS Bridge
parent 3dd6174e0d
commit b5bae80bb5
3 changed files with 46 additions and 0 deletions

View File

@ -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++;

View File

@ -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

View File

@ -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} .