Commit f8d39c01c376dc91f66936cfaf5dae3d44e9d268

Authored by ths
1 parent 2c90d794

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
Showing 1 changed file with 10 additions and 0 deletions
... ... @@ -8580,6 +8580,16 @@ int main(int argc, char **argv)
8580 8580 nb_drives_opt == 0)
8581 8581 help(1);
8582 8582  
  8583 + if (!linux_boot && *kernel_cmdline != '\0') {
  8584 + fprintf(stderr, "-append only allowed with -kernel option\n");
  8585 + exit(1);
  8586 + }
  8587 +
  8588 + if (!linux_boot && initrd_filename != NULL) {
  8589 + fprintf(stderr, "-initrd only allowed with -kernel option\n");
  8590 + exit(1);
  8591 + }
  8592 +
8583 8593 /* boot to floppy or the default cd if no hard disk defined yet */
8584 8594 if (!boot_devices[0]) {
8585 8595 boot_devices = "cad";
... ...