Bail out if -append or -initrd is specified without -kernel
PATCH 1/1 Bail out if -append or -initrd is specified without -kernel
The append and initrd options are only allowed with the kernel option. Make both depend on the kernel option. This should take care of the confusion seen recently [1].
[1] http://permalink.gmane.org/gmane.comp.emulators.qemu/26684
- Sebastian
vl.c Mon Jun 23 14:32:16 2008 renamed from vl.c.orig Mon Jun 23 14:15:30 2008 +10 -0
@@ -8386,6 +8386,16 @@ nb_drives_opt == 0) help(1); + if (!linux_boot && *kernel_cmdline != '\0') { + fprintf(stderr, "-append only allowed with -kernel option\n"); + exit(1); + } + + if (!linux_boot && initrd_filename != NULL) { + fprintf(stderr, "-initrd only allowed with -kernel option\n"); + exit(1); + } + /* boot to floppy or the default cd if no hard disk defined yet */ if (!boot_devices[0]) { boot_devices = "cad";