qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Confused by QOM: /machine/unattached/device[5]/dr-conne


From: Andreas Färber
Subject: Re: [Qemu-devel] Confused by QOM: /machine/unattached/device[5]/dr-connector[255]/fdt
Date: Wed, 9 Sep 2015 18:30:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

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 via email to

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