aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules/linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/modules/linux.c')
-rw-r--r--com32/modules/linux.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/com32/modules/linux.c b/com32/modules/linux.c
index 70afdcb6..0c40df2d 100644
--- a/com32/modules/linux.c
+++ b/com32/modules/linux.c
@@ -143,7 +143,16 @@ int main(int argc, char *argv[])
}
kernel_name = arg;
- argp++;
+
+ boot_image = malloc(strlen(kernel_name)+12);
+ if (!boot_image)
+ goto bail;
+ strcpy(boot_image, "BOOT_IMAGE=");
+ strcpy(boot_image+11, kernel_name);
+ /* argp now points to the kernel name, and the command line follows.
+ Overwrite the kernel name with the BOOT_IMAGE= argument, and thus
+ we have the final argument. */
+ *argp = boot_image;
if (find_boolean(argp,"quiet"))
opt_quiet = true;
@@ -159,18 +168,6 @@ int main(int argc, char *argv[])
if (!opt_quiet)
printf("ok\n");
- boot_image = malloc(strlen(kernel_name)+12);
- if (!boot_image)
- goto bail;
-
- strcpy(boot_image, "BOOT_IMAGE=");
- strcpy(boot_image+11, kernel_name);
-
- /* argp now points to the kernel name, and the command line follows.
- Overwrite the kernel name with the BOOT_IMAGE= argument, and thus
- we have the final argument. */
- *argp = boot_image;
-
cmdline = make_cmdline(argp);
if (!cmdline)
goto bail;