提交 3b6784d1 编写于 作者: P Peter Krempa

lib: Don't force the key argument when deleting metadata

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.
上级 73bfac0e
......@@ -10739,7 +10739,8 @@ virDomainSetMetadata(virDomainPtr domain,
break;
case VIR_DOMAIN_METADATA_ELEMENT:
virCheckNonNullArgGoto(uri, error);
virCheckNonNullArgGoto(key, error);
if (metadata)
virCheckNonNullArgGoto(key, error);
break;
default:
/* For future expansion */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册