[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Allow to leave type on default in -machine
From: |
Richard W.M. Jones |
Subject: |
Re: [Qemu-devel] [PATCH] Allow to leave type on default in -machine |
Date: |
Mon, 25 Jul 2011 17:21:07 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden>
> ---
> 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
- [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Jan Kiszka, 2011/07/23
- [Qemu-devel] [RESEND][PATCH 2/2] Deprecate -M command line options, Jan Kiszka, 2011/07/23
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Anthony Liguori, 2011/07/23
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Richard W.M. Jones, 2011/07/25
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Jan Kiszka, 2011/07/25
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Richard W.M. Jones, 2011/07/25
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Jan Kiszka, 2011/07/25
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Markus Armbruster, 2011/07/25
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Jan Kiszka, 2011/07/25
- [Qemu-devel] [PATCH] Allow to leave type on default in -machine, Jan Kiszka, 2011/07/25
- Re: [Qemu-devel] [PATCH] Allow to leave type on default in -machine,
Richard W.M. Jones <=
- Re: [Qemu-devel] [PATCH] Allow to leave type on default in -machine, Alexander Graf, 2011/07/25
- Re: [Qemu-devel] [PATCH] Allow to leave type on default in -machine, Anthony Liguori, 2011/07/29
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Anthony Liguori, 2011/07/25
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Peter Maydell, 2011/07/25
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Peter Maydell, 2011/07/25
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Jan Kiszka, 2011/07/25
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Peter Maydell, 2011/07/25
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Jan Kiszka, 2011/07/25
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Alexander Graf, 2011/07/25
- Re: [Qemu-devel] [RESEND][PATCH v3] Generalize -machine command line option, Anthony Liguori, 2011/07/25