[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 1/2] qbus_find_recursive(): don't abort search for
From: |
Laszlo Ersek |
Subject: |
Re: [Qemu-devel] [RFC 1/2] qbus_find_recursive(): don't abort search for named bus on full bus node |
Date: |
Thu, 31 Jan 2013 17:26:29 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130108 Thunderbird/10.0.12 |
On 01/31/13 17:09, Peter Maydell wrote:
> On 31 January 2013 16:05, Laszlo Ersek <address@hidden> wrote:
>> On 01/31/13 16:52, Peter Maydell wrote:
>>> This looks like the wrong fix to this problem -- if the user passed
>>> us a specific name to search for and we found it and it was full, then
>>> we definitely want to stop here.
>>
>> You only skip the children, but not the siblings. When you return NULL
>> here, the sibling loop one stack frame higher up continues anyway.
>
> Then that's a bug in the caller
The caller is the same function; it's recursive.
> -- it should actually stop on
> error, not plough ahead. [that is, we need to distinguish
> "not found" from "found and it won't work" from "found".]
Agreed.
Is uniqueness of bus names enforced somewhere?
Thanks!
Laszlo
Re: [Qemu-devel] traversal termination in qbus_find_recursive() due to "max_dev", Laszlo Ersek, 2013/01/31
[Qemu-devel] [RFC 2/2] qbus_find_recursive(): the "free slots" constraint needs a dedicated error, Laszlo Ersek, 2013/01/31
- Re: [Qemu-devel] [RFC 2/2] qbus_find_recursive(): the "free slots" constraint needs a dedicated error, Peter Maydell, 2013/01/31
- Re: [Qemu-devel] [RFC 2/2] qbus_find_recursive(): the "free slots" constraint needs a dedicated error, Laszlo Ersek, 2013/01/31
- Re: [Qemu-devel] [RFC 2/2] qbus_find_recursive(): the "free slots" constraint needs a dedicated error, Peter Maydell, 2013/01/31
- Re: [Qemu-devel] [RFC 2/2] qbus_find_recursive(): the "free slots" constraint needs a dedicated error, Laszlo Ersek, 2013/01/31
- Re: [Qemu-devel] [RFC 2/2] qbus_find_recursive(): the "free slots" constraint needs a dedicated error, Peter Maydell, 2013/01/31
- Re: [Qemu-devel] [RFC 2/2] qbus_find_recursive(): the "free slots" constraint needs a dedicated error, Laszlo Ersek, 2013/01/31