[libvirt] [PATCHv3 09/26] util: storagesource: Add helper to copy and free storage source seclabels

Eric Blake eblake at redhat.com
Wed Jun 25 23:05:29 UTC 2014


On 06/25/2014 10:54 AM, Peter Krempa wrote:
> They will be reused to transfer disk labels from snapshotted disks to
> the new disk definitions.
> ---
>  src/libvirt_private.syms  |  1 +
>  src/util/virstoragefile.c | 45 ++++++++++++++++++++++++++++++++++++++-------
>  src/util/virstoragefile.h |  3 +++
>  3 files changed, 42 insertions(+), 7 deletions(-)
> 

> +++ b/src/util/virstoragefile.c
> @@ -1515,6 +1515,31 @@ virStorageSourceGetSecurityLabelDef(virStorageSourcePtr src,
>  }
> 
> 
> +int
> +virStorageSourceSeclabelsCopy(virStorageSourcePtr to,
> +                              const virStorageSource *from)

Worth a doc comment, particularly mentioning that this version replaces
any existing labels in 'to' (there are other feasible semantics, such as
erroring out if there are existing labels in 'to', so adding docs makes
it obvious what semantics you chose without making me have to read the
code).

ACK once you add that.

-- 
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/20140625/25fc04ff/attachment-0001.sig>


More information about the libvir-list mailing list