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>
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");
*--p = '\0';
}
mp++;
+ if (*argp)
+ argp++; /* Advance past module_separator */
}
return module_count;