[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qdev: obey no_user
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH] qdev: obey no_user |
Date: |
Mon, 07 Jan 2013 15:20:17 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
Am 17.12.2012 17:00, schrieb Christian Borntraeger:
> since
>
> commit 18b6dade8c0799c48f5c5e124b8c407cd5e22e96
> qdev: refactor device creation to allow bus_info to be set only in class
>
> A user can specify a device that is no_user.
> For example on my i386 box, I can add a 2nd kvmvapic device.
>
> This patch checks for no-user and rejects the device_add.
>
> Signed-off-by: Christian Borntraeger <address@hidden>
> ---
> hw/qdev-monitor.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
> index a1b4d6a..b2c34e7 100644
> --- a/hw/qdev-monitor.c
> +++ b/hw/qdev-monitor.c
> @@ -426,6 +426,11 @@ DeviceState *qdev_device_add(QemuOpts *opts)
> }
>
> k = DEVICE_CLASS(obj);
> + if (k->no_user) {
Ack for this check...
> + qerror_report(QERR_INVALID_PARAMETER_VALUE, "driver", "a driver
> name");
> + error_printf_unless_qmp("Try with argument 'help' for a list.\n");
...but I'm not sure if this error reporting with QERR_... is still in
the desired form, cc'ing Luiz.
Andreas
> + return NULL;
> + }
>
> /* find bus */
> path = qemu_opt_get(opts, "bus");
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- Re: [Qemu-devel] [PATCH] qdev: obey no_user, Christian Borntraeger, 2013/01/07
- Re: [Qemu-devel] [PATCH] qdev: obey no_user,
Andreas Färber <=
- Re: [Qemu-devel] [PATCH] qdev: obey no_user, Anthony Liguori, 2013/01/07
- Re: [Qemu-devel] [PATCH] qdev: obey no_user, Peter Maydell, 2013/01/07
- Re: [Qemu-devel] [PATCH] qdev: obey no_user, Anthony Liguori, 2013/01/07
- Re: [Qemu-devel] [PATCH] qdev: obey no_user, Peter Maydell, 2013/01/07
- Re: [Qemu-devel] [PATCH] qdev: obey no_user, Anthony Liguori, 2013/01/07
- Re: [Qemu-devel] [PATCH] qdev: obey no_user, Andreas Färber, 2013/01/07
- Re: [Qemu-devel] [PATCH] qdev: obey no_user, Peter Maydell, 2013/01/07
- Re: [Qemu-devel] [PATCH] qdev: obey no_user, Andreas Färber, 2013/01/07
- Re: [Qemu-devel] [PATCH] qdev: obey no_user, Anthony Liguori, 2013/01/07