qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH] qmp: Report path ambiguity error


From: Andreas Färber
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] qmp: Report path ambiguity error.
Date: Mon, 05 May 2014 11:37:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Am 29.04.2014 00:46, schrieb Hani Benhabiles:
> Signed-off-by: Hani Benhabiles <address@hidden>
> Suggested-by: Andreas Färber <address@hidden>
> ---
>  qmp.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/qmp.c b/qmp.c
> index 74107be..0d49abf 100644
> --- a/qmp.c
> +++ b/qmp.c
> @@ -199,7 +199,10 @@ ObjectPropertyInfoList *qmp_qom_list(const char *path, 
> Error **errp)
>      ObjectProperty *prop;
>  
>      obj = object_resolve_path(path, &ambiguous);
> -    if (obj == NULL) {
> +    if (ambiguous) {
> +        error_setg(errp, "Path '%s' is ambiguous", path);
> +        return NULL;
> +    } else if (obj == NULL) {
>          error_set(errp, QERR_DEVICE_NOT_FOUND, path);
>          return NULL;
>      }

This is not quite what I suggested, but assuming bool ambiguous gets
initialized to false, this variant should work too.

Hani, please note that your Signed-off-by should be the last line in the
commit message. No need to resend just for that. I'll try to dig out the
code for a proper Rb later.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]