[libvirt] [PATCH] xenapi: support xenapi 5.6.0 headers

Matthias Bolte matthias.bolte at googlemail.com
Sat Aug 21 15:52:23 UTC 2010


2010/8/21 Eric Blake <eblake at redhat.com>:
> * src/xenapi/xenapi_driver.c (xenapiDomainGetInfo): Avoid using
> XEN_VM_POWER_STATE_UNKNOWN, which disappeared in newer xenapi.
> * src/xenapi/xenapi_utils.c (mapPowerState): Likewise.
> ---

> I guess I could fold the default: and UNDEFINED: case labels
> into one, if that is desirable.

You could make XEN_VM_POWER_STATE_UNDEFINED fall through to default as in

case XEN_VM_POWER_STATE_UNDEFINED:
default:
    /* Includes XEN_VM_POWER_STATE_UNKNOWN from libxenserver
     * 5.5.0, which is gone in 5.6.0.  */
    virState = VIR_DOMAIN_NOSTATE;
    break;

I think that it's not desirable to remove XEN_VM_POWER_STATE_UNDEFINED
completely.

ACK.

Matthias




More information about the libvir-list mailing list