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