qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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

  reply	other threads:[~2014-05-05  9:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1398725186-8202-1-git-send-email-kroosec@gmail.com>
2014-05-03  8:38 ` [Qemu-devel] [Qemu-trivial] [PATCH] qmp: Report path ambiguity error Michael Tokarev
2014-05-05  9:12   ` Michael Tokarev
2014-05-05  9:26     ` Andreas Färber [this message]
2014-05-05  9:31       ` Michael Tokarev
2014-05-05  9:37 ` [Qemu-devel] " 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).