[libvirt] [PATCH 1/6] Introduce a new virDomainUpdateDeviceFlags public API

Eric Blake eblake at redhat.com
Wed Mar 24 21:46:14 UTC 2010


On 03/24/2010 05:46 AM, Daniel P. Berrange wrote:
> +++ b/src/libvirt.c
> @@ -1868,7 +1868,7 @@ error:
>   *
>   * Deprecated after 0.4.6.
>   * Renamed to virDomainCreateXML() providing identical functionality.
> - * This existing name will left indefinitely for API compatability.
> + * This existing name will left indefinitely for API compatibility.

s/will left/will be left/

>  /**
> + * virDomainUpdateDeviceFlags:
> + * @domain: pointer to domain object
> + * @xml: pointer to XML description of one device
> + * @flags: an OR'ed set of virDomainDeviceModifyFlags
> + *
> + * Change a virtual device on a domain, using the flags parameter
> + * to control how the device is changed.  VIR_DOMAIN_DEVICE_MODIFY_CURRENT
> + * specifies that the device change is made based on current domain
> + * state.  VIR_DOMAIN_DEVICE_MODIFY_LIVE specifies that the device shall be
> + * changed on the active domain instance only and is not added to the
> + * persisted domain configuration. VIR_DOMAIN_DEVICE_MODIFY_CONFIG
> + * specifies that the device shall be changed on the persisted domain
> + * configuration only.  Note that the target hypervisor must return an
> + * error if unable to satisfy flags.  E.g. the hypervisor driver will
> + * return failure if LIVE is specified but it only supports modifying the
> + * persisted device allocation.

s/persisted/persistent/ (you fixed new instances of this in 3/6, but my
review of your first round missed that you had also introduced multiple
instances in 1/6)

> +    if (conn->driver->domainUpdateDeviceFlags) {
> +        int ret;
> +        ret = conn->driver->domainUpdateDeviceFlags(domain, xml, flags);

These two lines could be merged into one.

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 323 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100324/298bb5f1/attachment-0001.sig>


More information about the libvir-list mailing list