From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlNu6-0000gj-IE for qemu-devel@nongnu.org; Mon, 25 Jul 2011 12:21:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QlNu5-0005YG-GY for qemu-devel@nongnu.org; Mon, 25 Jul 2011 12:21:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlNu5-0005Y9-9V for qemu-devel@nongnu.org; Mon, 25 Jul 2011 12:21:13 -0400 Date: Mon, 25 Jul 2011 17:21:07 +0100 From: "Richard W.M. Jones" Message-ID: <20110725162044.GT2532@amd.home.annexia.org> References: <4E2AA4AD.2080608@web.de> <20110725094156.GD21852@amd.home.annexia.org> <4E2D465D.7030502@siemens.com> <20110725104542.GR2532@amd.home.annexia.org> <4E2D4CA1.1080504@siemens.com> <4E2D5801.9020904@siemens.com> <4E2D95A8.4060303@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E2D95A8.4060303@siemens.com> Subject: Re: [Qemu-devel] [PATCH] Allow to leave type on default in -machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Anthony PERARD , Ian Campbell , Anthony Liguori , Markus Armbruster , qemu-devel On Mon, Jul 25, 2011 at 06:11:20PM +0200, Jan Kiszka wrote: > I was incorrectly pointing the core, the problem is solvable at the > level where we parse -machine: > > -------8<-------- > > This allows to specify -machine options without setting an explicit > machine type. We will pick the default machine in this case. Requesting > the list of available machines is still possible via '-machine ?' e.g. > > Signed-off-by: Jan Kiszka > --- > vl.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/vl.c b/vl.c > index 8256504..5e53ddc 100644 > --- a/vl.c > +++ b/vl.c > @@ -2720,7 +2720,10 @@ int main(int argc, char **argv, char **envp) > fprintf(stderr, "parse error: %s\n", optarg); > exit(1); > } > - machine = machine_parse(qemu_opt_get(opts, "type")); > + optarg = qemu_opt_get(opts, "type"); > + if (optarg) { > + machine = machine_parse(optarg); > + } > break; > case QEMU_OPTION_usb: > usb_enabled = 1; > -- > 1.7.3.4 I have tested this patch, and it allows libguestfs to work without modifications. ie qemu -machine accel=[...] works as before. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org