Re: [PATCH 11/14] lib: Don't force the key argument when deleting metadata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/10/2013 04:15 AM, Peter Krempa wrote:
> virDomainSetMetadata when operating on the metadata element was
> requesting the @key argument to be passed even if @metadata was NULL
> used to delete the corresponding metadata element. This is not needed as
> the key is only used when adding the element and matching is done via
> the XML namespace.
> ---
>  src/libvirt.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libvirt.c b/src/libvirt.c
> index 07a3fd5..2c94950 100644
> --- a/src/libvirt.c
> +++ b/src/libvirt.c
> @@ -10734,7 +10734,8 @@ virDomainSetMetadata(virDomainPtr domain,
>          break;
>      case VIR_DOMAIN_METADATA_ELEMENT:
>          virCheckNonNullArgGoto(uri, error);
> -        virCheckNonNullArgGoto(key, error);
> +        if (metadata)
> +            virCheckNonNullArgGoto(key, error);

ACK - if we delete ALL metadata (rather than just the metadata tied to a
particular key), then it doesn't matter what key we pass.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]