From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MRW6u-0007ew-TI for qemu-devel@nongnu.org; Thu, 16 Jul 2009 14:55:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MRW6q-0007eG-Gu for qemu-devel@nongnu.org; Thu, 16 Jul 2009 14:55:16 -0400 Received: from [199.232.76.173] (port=56578 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MRW6q-0007e6-BS for qemu-devel@nongnu.org; Thu, 16 Jul 2009 14:55:12 -0400 Received: from mx2.redhat.com ([66.187.237.31]:53193) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MRW6o-0004Nh-Dw for qemu-devel@nongnu.org; Thu, 16 Jul 2009 14:55:11 -0400 Message-ID: <4A5F7789.8070500@redhat.com> Date: Thu, 16 Jul 2009 20:55:05 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v3 5/5] switch -drive to QemuOpts. References: <1247756224-19219-1-git-send-email-kraxel@redhat.com> <1247756224-19219-6-git-send-email-kraxel@redhat.com> <4A5F5053.5000809@codemonkey.ws> In-Reply-To: <4A5F5053.5000809@codemonkey.ws> Content-Type: multipart/mixed; boundary="------------040004000100010107080906" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------040004000100010107080906 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 07/16/09 18:07, Anthony Liguori wrote: > Gerd Hoffmann wrote: >> Demo QemuOpts in action ;) >> >> Implementing a alternative way to specify the filename should be >> just a few lines of code now once we decided how the cmd line syntax >> should look like. >> >> Signed-off-by: Gerd Hoffmann > > $ x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img -snapshot > drive: : index="0" media="disk" > file="/home/anthony/images/linux.img" snapshot="1" > qemu: '1' invalid snapshot option > > Not quite sure that's the action you were looking for... Quick fix (incremental) attached. Oh, and a leftover debug line ... cheers, Gerd --------------040004000100010107080906 Content-Type: text/plain; name="fix" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix" diff --git a/vl.c b/vl.c index dfdea55..7d07d69 100644 --- a/vl.c +++ b/vl.c @@ -2346,7 +2346,7 @@ static int drive_init_func(QemuOpts *opts, void *opaque) QEMUMachine *machine = opaque; int fatal_error = 0; - qemu_opts_print(opts, NULL); +// qemu_opts_print(opts, NULL); if (drive_init(opts, machine, &fatal_error) == NULL) { if (fatal_error) return 1; @@ -2357,7 +2357,7 @@ static int drive_init_func(QemuOpts *opts, void *opaque) static int drive_enable_snapshot(QemuOpts *opts, void *opaque) { if (NULL == qemu_opt_get(opts, "snapshot")) { - qemu_opt_set(opts, "snapshot", "1"); + qemu_opt_set(opts, "snapshot", "on"); } return 0; } --------------040004000100010107080906--