[libvirt] [PATCH 1/4] qemu: Add a new domain lookup helper and improve the docs
Eric Blake
eblake at redhat.com
Tue Dec 11 21:46:10 UTC 2012
On 12/11/2012 11:48 AM, Peter Krempa wrote:
> This patch adds a new domain lookup helper qemuDomObjFromDomainDriver
> that lookups the domain and leaves the driver locked. The driver is
> returned as the second argument of that function. If the lookup fails
> the driver is unlocked to help avoid cleanup codepaths.
>
> This patch also improves docs for the helpers.
> ---
> src/qemu/qemu_driver.c | 45 ++++++++++++++++++++++++++++++++++++++++-----
> 1 file changed, 40 insertions(+), 5 deletions(-)
> +/**
> + * qemuDomObjFromDomainDriver:
> + * @domain: Domain pointer that has to be looked up
> + * @drv: Pointer to virQEMUDriverPtr to return the driver object
> + *
> + * This fucntion looks up @domain in the domain list and returns the
s/fucntion/function/
> + * appropriate virDomainObjPtr. On sucessful lookup, both driver and domain
s/sucessful/successful/
> + * object are returned locked.
> + *
> + * Returns the domain object if it's found and the driver. Both are locked.
> + * In case of failure NULL is returned and the driver isn't locked.
> + */
> +/**
> + * qemuDomObjFromDomain:
> + * @domain: Domain pointer that has to be looked up
> + *
> + * This function looks up @domain and returns the appropriate
> + * virDomainObjPtr. The driver is unlocked after the call.
> + *
> + * Returns the domain object which is locked on success, NULL
> + * otherwise. Te driver remains unlocked after the call.
s/Te/The/
ACK with spelling fixes.
--
Eric Blake eblake 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: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121211/b858cf38/attachment-0001.sig>
More information about the libvir-list
mailing list