qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 2/2] qbus_find_recursive(): the "free slots" const


From: Laszlo Ersek
Subject: Re: [Qemu-devel] [RFC 2/2] qbus_find_recursive(): the "free slots" constraint needs a dedicated error
Date: Thu, 31 Jan 2013 17:05:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130108 Thunderbird/10.0.12

On 01/31/13 16:54, Peter Maydell wrote:
> On 31 January 2013 15:42, Laszlo Ersek <address@hidden> wrote:
>> When searching for a bus by name, lookup failure means different things
>> for qbus_find_bus() and qbus_find_recursive(); distinguish them by error
>> codes as well.
>>
>> Signed-off-by: Laszlo Ersek <address@hidden>
>> ---
>>  include/qapi/qmp/qerror.h |    3 +++
>>  hw/qdev-monitor.c         |    2 +-
>>  2 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h
>> index 6c0a18d..940ac21 100644
>> --- a/include/qapi/qmp/qerror.h
>> +++ b/include/qapi/qmp/qerror.h
>> @@ -69,6 +69,9 @@ void assert_no_error(Error *err);
>>  #define QERR_BUS_NOT_FOUND \
>>      ERROR_CLASS_GENERIC_ERROR, "Bus '%s' not found"
>>
>> +#define QERR_BUS_WITH_SLOTS_NOT_FOUND \
>> +    ERROR_CLASS_GENERIC_ERROR, "No bus called '%s' with free slots was 
>> found"
>> +
> 
> I thought we weren't adding any new QERR errors any more?

How do you intend to inform the user about new error situations? If
error codes are a fixed set, then we need either a facility for freely
extending text in the error object, or for stacking separate messages in
the error object.

Thanks
Laszlo



reply via email to

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