From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KAnNj-0001pe-7h for qemu-devel@nongnu.org; Mon, 23 Jun 2008 10:50:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KAnNh-0001od-OI for qemu-devel@nongnu.org; Mon, 23 Jun 2008 10:50:58 -0400 Received: from [199.232.76.173] (port=48507 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KAnNh-0001oO-DT for qemu-devel@nongnu.org; Mon, 23 Jun 2008 10:50:57 -0400 Received: from mail.gmx.net ([213.165.64.20]:39231) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KAnNh-0002iy-62 for qemu-devel@nongnu.org; Mon, 23 Jun 2008 10:50:57 -0400 Message-ID: <009c01c8d540$8804fa70$0201a8c0@zeug> From: "Sebastian Herbszt" Date: Mon, 23 Jun 2008 16:49:38 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] Bail out if -append or -initrd is specified without -kernel Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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.orig Mon Jun 23 14:15:30 2008 +++ vl.c Mon Jun 23 14:32:16 2008 @@ -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";