From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH 3/3 V2] kvm tools: Add cmdline options for loading multiple images Date: Wed, 04 May 2011 09:33:27 -0600 Message-ID: <4DC171C7.2060601@gmail.com> References: <1304516717-24512-1-git-send-email-levinsasha928@gmail.com> <1304516717-24512-4-git-send-email-levinsasha928@gmail.com> <4DC167E5.1020707@gmail.com> <1304521423.22299.8.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: penberg@kernel.org, kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com, gorcunov@gmail.com, prasadjoshi124@gmail.com To: Sasha Levin Return-path: Received: from mail-pw0-f46.google.com ([209.85.160.46]:45592 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753183Ab1EDPdb (ORCPT ); Wed, 4 May 2011 11:33:31 -0400 Received: by pwi15 with SMTP id 15so563937pwi.19 for ; Wed, 04 May 2011 08:33:30 -0700 (PDT) In-Reply-To: <1304521423.22299.8.camel@lappy> Sender: kvm-owner@vger.kernel.org List-ID: On 05/04/11 09:03, Sasha Levin wrote: > On Wed, 2011-05-04 at 08:51 -0600, David Ahern wrote: >> >> On 05/04/11 07:45, Sasha Levin wrote: >>> This is a simple cmdline addition to allow loading multiple images. >>> perf's cmdline parser doesn't support having multiple args >>> with the same name (i.e. --image --image ), so >>> we have to choose either to extend the parser, or find a diiferent >>> way to assign multiple images. >>> >>> Sample cmdline for loading 2 images: >>> ./kvm run --image=image1.raw --readonly --image2=image2.raw --readonly2 >> >> syntax is getting a bit unwieldy. Why not use a scheme similar to qemu >> and concatenate related arguments into one and handle multiple usages? >> e.g., --image=image1.raw,ro --image=image2.raw,ro > > That'll probably how it'll end up being. Currently the cmdline parser > doesn't support it and I didn't want to mix parser changes with > virtio-blk patch. It's using the option parser from perf, so you need to change: OPT_STRING('i', "image", &image_filename, "image", "Disk image"), to OPT_CALLBACK and create a parser function specific to this input argument. For example, checkout tools/perf/builtin-script.c, parse_output_fields. The parser is specific to the image argument and hence should be a part of this change set. David > > This patch should just allow testing of the multiple virtio-blk feature. >