From: "Andreas Färber" <afaerber@suse.de>
To: Michael Tokarev <mjt@tls.msk.ru>,
Hani Benhabiles <kroosec@gmail.com>,
qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, lcapitulino@redhat.com
Subject: Re: [Qemu-trivial] [PATCH] qmp: Report path ambiguity error.
Date: Mon, 05 May 2014 11:26:13 +0200 [thread overview]
Message-ID: <53675935.7010105@suse.de> (raw)
In-Reply-To: <5367560A.8010000@msgid.tls.msk.ru>
Am 05.05.2014 11:12, schrieb Michael Tokarev:
> 03.05.2014 12:38, Michael Tokarev wrote:
> []
>> --- a/qmp.c
>> +++ b/qmp.c
>> @@ -200,7 +200,9 @@ ObjectPropertyInfoList *qmp_qom_list(const char *path, Error **errp)
>>
>> obj = object_resolve_path(path, &ambiguous);
>> if (obj == NULL) {
>> - error_set(errp, QERR_DEVICE_NOT_FOUND, path);
>> + error_set(errp,
>> + ambiguous ? "Path '%s' is ambiguous" : QERR_DEVICE_NOT_FOUND,
>> + path);
>> return NULL;
>> }
>
> I've applied this version.
Please undo. error_set() unlike error_setg() expects an ErrorClass
argument before the string. QERR_* macro contains *two* comma-separated
values, so it is on top filling in the device-not-found message as path
in the ambiguous case.
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
WARNING: multiple messages have this Message-ID (diff)
From: "Andreas Färber" <afaerber@suse.de>
To: Michael Tokarev <mjt@tls.msk.ru>,
Hani Benhabiles <kroosec@gmail.com>,
qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] qmp: Report path ambiguity error.
Date: Mon, 05 May 2014 11:26:13 +0200 [thread overview]
Message-ID: <53675935.7010105@suse.de> (raw)
In-Reply-To: <5367560A.8010000@msgid.tls.msk.ru>
Am 05.05.2014 11:12, schrieb Michael Tokarev:
> 03.05.2014 12:38, Michael Tokarev wrote:
> []
>> --- a/qmp.c
>> +++ b/qmp.c
>> @@ -200,7 +200,9 @@ ObjectPropertyInfoList *qmp_qom_list(const char *path, Error **errp)
>>
>> obj = object_resolve_path(path, &ambiguous);
>> if (obj == NULL) {
>> - error_set(errp, QERR_DEVICE_NOT_FOUND, path);
>> + error_set(errp,
>> + ambiguous ? "Path '%s' is ambiguous" : QERR_DEVICE_NOT_FOUND,
>> + path);
>> return NULL;
>> }
>
> I've applied this version.
Please undo. error_set() unlike error_setg() expects an ErrorClass
argument before the string. QERR_* macro contains *two* comma-separated
values, so it is on top filling in the device-not-found message as path
in the ambiguous case.
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
next prev parent reply other threads:[~2014-05-05 9:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 22:46 [Qemu-trivial] [PATCH] qmp: Report path ambiguity error Hani Benhabiles
2014-05-03 8:38 ` Michael Tokarev
2014-05-03 8:38 ` [Qemu-devel] " Michael Tokarev
2014-05-05 9:12 ` Michael Tokarev
2014-05-05 9:12 ` [Qemu-devel] " Michael Tokarev
2014-05-05 9:26 ` Andreas Färber [this message]
2014-05-05 9:26 ` Andreas Färber
2014-05-05 9:31 ` Michael Tokarev
2014-05-05 9:31 ` [Qemu-devel] " Michael Tokarev
2014-05-05 9:37 ` [Qemu-trivial] [Qemu-devel] " Andreas Färber
2014-05-05 9:37 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53675935.7010105@suse.de \
--to=afaerber@suse.de \
--cc=kroosec@gmail.com \
--cc=lcapitulino@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.