[libvirt] [PATCH v4 3/4] Implement the core API to suspend/resume the host

Srivatsa S. Bhat srivatsa.bhat at linux.vnet.ibm.com
Mon Nov 28 17:59:35 UTC 2011


On 11/28/2011 11:26 PM, Eric Blake wrote:

> On 11/28/2011 10:46 AM, Srivatsa S. Bhat wrote:
> 
>>>> +    /* Check if the host supports the requested suspend state */
>>>> +    switch (state) {
>>>> +    case VIR_NODE_S3:
>>>> +        if (hostPMFeatures & VIR_NODE_S3) {
>>>> +            cmdString = strdup("pm-suspend");
>>>> +            if (cmdString == NULL) {
>>>> +                virReportOOMError();
>>>> +                goto cleanup;
>>>> +            }
>>>> +            break;
>>>> +        }
>>>> +        goto cleanup;
>>>
>>> Needs to report an error, VIR_ERR_OPERATION_UNSUPPORTED
>>>
>>
>>
>> Ok, then I will define VIR_ERR_OPERATION_UNSUPPORTED in
>> src/util/virterror.c and use it, since it is not there at
>> present. And that definition should be in a separate,
>> self-contained patch right?
> 
> Hmm, I think that was probably just a case of Daniel typing by memory
> instead of checking the source, and evidence of how confusing our
> existing error naming is.  Just use the existing
> VIR_ERR_OPERATION_INVALID instead of inventing a new error.
> 


Ok thanks, will do that.

-- 
Regards,
Srivatsa S. Bhat
IBM Linux Technology Center




More information about the libvir-list mailing list