mboot: include module filenames in the command line
authorH. Peter Anvin <hpa@zytor.com>
Wed, 29 Apr 2009 04:51:21 +0000 (21:51 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 29 Apr 2009 04:51:21 +0000 (21:51 -0700)
Grub includes the kernel and module filenames in the command lines it
passes, so match that behavior and don't strip them off.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
com32/mboot/mboot.c

index 41a5ef1..fc4f962 100644 (file)
@@ -121,7 +121,10 @@ static int get_modules(char **argv, struct module_data **mdp)
     }
     printf("ok\n");
 
-    argp++;
+    /* 
+     * Note: Grub includes the kernel filename in the command line, so we
+     * want to match that behavior.
+     */
     arglen = 0;
     for (argx = argp; *argx && strcmp(*argx, module_separator); argx++)
       arglen += strlen(*argx)+1;