提交 1c36d068 编写于 作者: S Soren Hansen 提交者: Daniel Veillard

Fix virDomainGetXMLDesc cache settings output

If a special cache strategy for a disk has been specified in a domain
definition, but no driverName has been set, virDomainGetXMLDesc would not
include the <driver> tag at all.

* src/conf/domain_conf.c: make sure any <driver> tag setting is
  serialized if set.
上级 785d8580
......@@ -4718,8 +4718,10 @@ virDomainDiskDefFormat(virBufferPtr buf,
" <disk type='%s' device='%s'>\n",
type, device);
if (def->driverName) {
virBufferVSprintf(buf, " <driver name='%s'", def->driverName);
if (def->driverName || def->driverType || def->cachemode) {
virBufferVSprintf(buf, " <driver");
if (def->driverName)
virBufferVSprintf(buf, " name='%s'", def->driverName);
if (def->driverType)
virBufferVSprintf(buf, " type='%s'", def->driverType);
if (def->cachemode)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册