diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-04-26 16:43:39 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-04-26 16:43:39 -0700 |
commit | 8575c10e6da46ce0c806066668eff786ed9a2f2a (patch) | |
tree | 0471d4a0fa77ab38c24d65b087b11465450dd567 /com32/mboot | |
parent | 5ed6ee3a7c56f3b24c713ba695487259ab7b06bd (diff) | |
download | syslinux-8575c10e6da46ce0c806066668eff786ed9a2f2a.tar.gz |
mboot: skip --- marker; decompress all files
When walking the argument list we need to skip --- markers.
Grub, and the old mboot.c32, seem to transparently decompress all
files, not just the main one, so do the same.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/mboot')
-rw-r--r-- | com32/mboot/mboot.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/com32/mboot/mboot.c b/com32/mboot/mboot.c index 77b864cd..fcde53d3 100644 --- a/com32/mboot/mboot.c +++ b/com32/mboot/mboot.c @@ -108,14 +108,10 @@ static int get_modules(char **argv, struct module_data **mdp) mp = md; argp = argv; while (*argp) { + /* Note: it seems Grub transparently decompresses all compressed files, + not just the primary kernel. */ printf("Loading %s... ", *argp); - if (md == mp) { - /* Transparently decompress the primary image */ - rv = zloadfile(*argp, &mp->data, &mp->len); - } else { - /* Leave decompressing auxilliary modules to the OS */ - rv = loadfile(*argp, &mp->data, &mp->len); - } + rv = zloadfile(*argp, &mp->data, &mp->len); if (rv) { printf("failed!\n"); @@ -140,6 +136,8 @@ static int get_modules(char **argv, struct module_data **mdp) *--p = '\0'; } mp++; + if (*argp) + argp++; /* Advance past module_separator */ } return module_count; |