[libvirt] [PATCH v4 3/4] Implement the core API to suspend/resume the host
Eric Blake
eblake at redhat.com
Mon Nov 28 17:56:33 UTC 2011
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.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111128/038b8b1f/attachment-0001.sig>
More information about the libvir-list
mailing list