提交 3a53ab79 编写于 作者: C Cole Robinson

Unbreak virsh *-edit commands: Don't pass unexpected flags to DumpXML

上级 c4824392
Mon Feb 16 17:59:04 EST 2009 Cole Robinson <crobinso@redhat.com>
* src/virsh.c, src/Makefile.am: Don't pass flags to DumpXML
in *-edit virsh commands
Mon Feb 16 17:55:50 EST 2009 Cole Robinson <crobinso@redhat.com>
* src/storage_backend_logical.c: Remove erroneous lvm volume
......
......@@ -510,6 +510,7 @@ virsh-net-edit.c: virsh.c Makefile.am
-e 's/Domain/Network/g' \
-e 's/cmdEdit/cmdNetworkEdit/g' \
-e 's/dom/network/g' \
-e 's/int flags.*/int flags = 0;/g' \
>> $@-tmp
chmod a-w $@-tmp
rm -f $@
......@@ -528,6 +529,7 @@ virsh-pool-edit.c: virsh.c Makefile.am
-e 's/cmdEdit/cmdPoolEdit/g' \
-e 's/\(virStoragePoolDefineXML.*\));/\1, 0);/' \
-e 's/dom/pool/g' \
-e 's/int flags.*/int flags = 0;/g' \
>> $@-tmp
chmod a-w $@-tmp
rm -f $@
......
......@@ -5397,6 +5397,7 @@ cmdEdit (vshControl *ctl, const vshCmd *cmd)
char *doc = NULL;
char *doc_edited = NULL;
char *doc_reread = NULL;
int flags = VIR_DOMAIN_XML_SECURE | VIR_DOMAIN_XML_INACTIVE;
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
goto cleanup;
......@@ -5406,7 +5407,7 @@ cmdEdit (vshControl *ctl, const vshCmd *cmd)
goto cleanup;
/* Get the XML configuration of the domain. */
doc = virDomainGetXMLDesc (dom, VIR_DOMAIN_XML_SECURE | VIR_DOMAIN_XML_INACTIVE);
doc = virDomainGetXMLDesc (dom, flags);
if (!doc)
goto cleanup;
......@@ -5436,7 +5437,7 @@ cmdEdit (vshControl *ctl, const vshCmd *cmd)
* it was being edited? This also catches problems such as us
* losing a connection or the domain going away.
*/
doc_reread = virDomainGetXMLDesc (dom, VIR_DOMAIN_XML_SECURE | VIR_DOMAIN_XML_INACTIVE);
doc_reread = virDomainGetXMLDesc (dom, flags);
if (!doc_reread)
goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册