qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] Confused by QOM: /machine/unattached/device[5]/dr-connector[255]/fdt
Date: Wed, 9 Sep 2015 18:30:49 +0200	[thread overview]
Message-ID: <55F05EB9.7040606@suse.de> (raw)
In-Reply-To: <55F05B4C.9080708@redhat.com>

Am 09.09.2015 um 18:16 schrieb Paolo Bonzini:
> On 09/09/2015 18:04, Andreas Färber wrote:
>>>> Should qom-list really fail DeviceNotFound?  I find it rather confusing.
>>>> For what it's worth, attempting to read a directory fails with EISDIR,
>>>> not ENOENT.
>> Listing a non-existing directory on my system results in:
>>
>>   ls: cannot access foo: No such file or directory
> 
> This is more like
> 
> $ ls vl.c/*
> ls: cannot access vl.c/*: Not a directory
> 
> So it's ENOTDIR.  Not really DeviceNotFound, but perhaps close enough.
> 
> FWIW, "struct" isn't a well-defined QAPI name.  The type probably should
> be changed to "any" (right?).

If you guys want to change either, just discuss among yourselves and
post a patch. I couldn't care less...

fdt does not resolve as an object, so any error message optimizations
would just add unnecessary complexity - unless I'm missing something.
(parsing the path, checking whether the parent object does resolve,
checking whether a property of the same name exists on that object)
Due to the QMP vs. HMP mess, two callsites may be affected.

The choice of type is done at the callsite, not in QOM code, so I'm even
more the wrong one to complain to. -> ppc maintainers?

Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)

  reply	other threads:[~2015-09-09 16:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 14:38 [Qemu-devel] Confused by QOM: /machine/unattached/device[5]/dr-connector[255]/fdt Markus Armbruster
2015-09-09 14:46 ` Andreas Färber
2015-09-09 15:22   ` Markus Armbruster
2015-09-09 16:04     ` Andreas Färber
2015-09-09 16:16       ` Paolo Bonzini
2015-09-09 16:30         ` Andreas Färber [this message]
2015-09-13  2:04         ` Eric Blake
2015-09-10  8:55       ` Markus Armbruster

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=55F05EB9.7040606@suse.de \
    --to=afaerber@suse.de \
    --cc=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@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).