提交 84f7b286 编写于 作者: O Osier Yang 提交者: Eric Blake

virsh: Remove using phy as default disk driver in cmdAttachDisk

* tools/virsh.c (virsh shouldn't use 'phy' as the disk driver if
user doesn't specify "--driver", it causes bugs, as not all of
hypervisor driver supports 'phy', and actually hypervisor should
known the correct default disk driver and subdriver, so remove it)
上级 3ea59d6a
......@@ -8668,11 +8668,16 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
virBufferVSprintf(&buf, " device='%s'", type);
virBufferAddLit(&buf, ">\n");
virBufferVSprintf(&buf, " <driver name='%s'",
(driver) ? driver : "phy");
if (driver || subdriver)
virBufferVSprintf(&buf, " <driver");
if (driver)
virBufferVSprintf(&buf, " name='%s'", driver);
if (subdriver)
virBufferVSprintf(&buf, " type='%s'", subdriver);
virBufferAddLit(&buf, "/>\n");
if (driver || subdriver)
virBufferAddLit(&buf, "/>\n");
virBufferVSprintf(&buf, " <source %s='%s'/>\n",
(isFile) ? "file" : "dev",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册