aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-03 10:01:15 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2008-07-03 10:01:15 +0000
commitf8d39c01c376dc91f66936cfaf5dae3d44e9d268 (patch)
tree189e77deeb7ada2c40d2f6ce3152ed66d3cc025f
parent2c90d79488a255f27d43f7ac3edffc8f01aaae51 (diff)
Bail out if -append or -initrd is specified without -kernel, by
Sebastian Herbszt. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4833 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--vl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index cde008e9ab..c8db57983b 100644
--- a/vl.c
+++ b/vl.c
@@ -8580,6 +8580,16 @@ int main(int argc, char **argv)
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";