From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KELcu-0007V2-F5 for qemu-devel@nongnu.org; Thu, 03 Jul 2008 06:01:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KELcr-0007UG-Qy for qemu-devel@nongnu.org; Thu, 03 Jul 2008 06:01:19 -0400 Received: from [199.232.76.173] (port=56444 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KELcr-0007Tt-Hh for qemu-devel@nongnu.org; Thu, 03 Jul 2008 06:01:17 -0400 Received: from savannah.gnu.org ([199.232.41.3]:56304 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KELcr-0007rN-6Z for qemu-devel@nongnu.org; Thu, 03 Jul 2008 06:01:17 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KELcq-0005AH-9W for qemu-devel@nongnu.org; Thu, 03 Jul 2008 10:01:16 +0000 Received: from ths by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KELcp-0005AA-RQ for qemu-devel@nongnu.org; Thu, 03 Jul 2008 10:01:16 +0000 MIME-Version: 1.0 Errors-To: ths Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Thiemo Seufer Message-Id: Date: Thu, 03 Jul 2008 10:01:15 +0000 Subject: [Qemu-devel] [4833] Bail out if -append or -initrd is specified without -kernel, by 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 Revision: 4833 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4833 Author: ths Date: 2008-07-03 10:01:15 +0000 (Thu, 03 Jul 2008) Log Message: ----------- Bail out if -append or -initrd is specified without -kernel, by Sebastian Herbszt. Modified Paths: -------------- trunk/vl.c Modified: trunk/vl.c =================================================================== --- trunk/vl.c 2008-07-03 04:13:24 UTC (rev 4832) +++ trunk/vl.c 2008-07-03 10:01:15 UTC (rev 4833) @@ -8580,6 +8580,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";