[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 08/29] qmp: improve error reporting for -obje
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH v4 08/29] qmp: improve error reporting for -object and object-add |
Date: |
Mon, 9 Jun 2014 17:57:20 +0200 |
On Mon, 9 Jun 2014 18:25:13 +0800
Hu Tao <address@hidden> wrote:
> From: Paolo Bonzini <address@hidden>
>
> Use QERR_INVALID_PARAMETER_VALUE for consistency.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Hu Tao <address@hidden>
> Reviewed-by: Eduardo Habkost <address@hidden>
> ---
> qmp.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/qmp.c b/qmp.c
> index b722dbe..cef60fb 100644
> --- a/qmp.c
> +++ b/qmp.c
> @@ -540,7 +540,8 @@ void object_add(const char *type, const char *id, const
> QDict *qdict,
>
> klass = object_class_by_name(type);
> if (!klass) {
> - error_setg(errp, "invalid class name");
> + error_set(errp, QERR_INVALID_PARAMETER_VALUE,
> + "qom-type", "a valid class name");
With implicit "qom-type" on CLI it might be not clear to user what value is
wrong. Perhaps following would be better:
error_setg(errp, "Invalid object type name: %s", type);
> return;
> }
>
> --
> 1.9.3
>
--
Regards,
Igor
- [Qemu-devel] [PATCH v4 02/29] NUMA: check if the total numa memory size is equal to ram_size, (continued)
- [Qemu-devel] [PATCH v4 02/29] NUMA: check if the total numa memory size is equal to ram_size, Hu Tao, 2014/06/09
- [Qemu-devel] [PATCH v4 01/29] NUMA: move numa related code to new file numa.c, Hu Tao, 2014/06/09
- [Qemu-devel] [PATCH v4 03/29] NUMA: Add numa_info structure to contain numa nodes info, Hu Tao, 2014/06/09
- [Qemu-devel] [PATCH v4 04/29] NUMA: convert -numa option to use OptsVisitor, Hu Tao, 2014/06/09
- [Qemu-devel] [PATCH v4 05/29] NUMA: expand MAX_NODES from 64 to 128, Hu Tao, 2014/06/09
- [Qemu-devel] [PATCH v4 06/29] man: improve -numa doc, Hu Tao, 2014/06/09
- [Qemu-devel] [PATCH v4 07/29] vl: redo -object parsing, Hu Tao, 2014/06/09
- [Qemu-devel] [PATCH v4 08/29] qmp: improve error reporting for -object and object-add, Hu Tao, 2014/06/09
- Re: [Qemu-devel] [PATCH v4 08/29] qmp: improve error reporting for -object and object-add,
Igor Mammedov <=
- [Qemu-devel] [PATCH v4 09/29] pc: pass MachineState to pc_memory_init, Hu Tao, 2014/06/09
- [Qemu-devel] [PATCH v4 10/29] numa: introduce memory_region_allocate_system_memory, Hu Tao, 2014/06/09
- [Qemu-devel] [PATCH v4 11/29] hostmem: separate allocation from UserCreatable complete method, Hu Tao, 2014/06/09
- [Qemu-devel] [PATCH v4 12/29] numa: add -numa node,memdev= option, Hu Tao, 2014/06/09