[libvirt] [PATCH 3/4] virStorageFileChainLookup: Return virStorageSourcePtr

Eric Blake eblake at redhat.com
Thu Apr 24 19:26:53 UTC 2014


On 04/22/2014 06:49 AM, Jiri Denemark wrote:
> Returning both virStorageSourcePtr and its path member does not make a
> lot of sense.

Yep - artifacts from pre-refactoring that are now pointless.

> 
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
>  src/qemu/qemu_driver.c    |  7 +++----
>  src/util/virstoragefile.c | 16 +++++++---------
>  src/util/virstoragefile.h |  7 +++----
>  tests/virstoragetest.c    | 39 +++++++++++++++++++++++----------------
>  4 files changed, 36 insertions(+), 33 deletions(-)

ACK with one nit:

> +++ b/src/util/virstoragefile.c
> @@ -1510,9 +1510,9 @@ int virStorageFileGetSCSIKey(const char *path,
>   * Since the results point within CHAIN, they must not be
>   * independently freed.  Reports an error and returns NULL if NAME is
>   * not found.  */
> -const char *
> +virStorageSourcePtr

The comments prior to this function are now out of date.  Update them to
something like:

Given a CHAIN, look for the backing file NAME within the chain and
return that location within the chain.  Pass NULL for NAME to find the
base of the chain.  If PARENT is not NULL, set *PARENT to the parent of
the result (or to NULL if NAME matches the start of the chain).  Reports
an error and returns NULL if NAME is not found.

-- 
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: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140424/8140763e/attachment-0001.sig>


More information about the libvir-list mailing list