mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
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)
This commit is contained in:
parent
3ea59d6acb
commit
84f7b286c2
@ -8668,11 +8668,16 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
|
|||||||
virBufferVSprintf(&buf, " device='%s'", type);
|
virBufferVSprintf(&buf, " device='%s'", type);
|
||||||
virBufferAddLit(&buf, ">\n");
|
virBufferAddLit(&buf, ">\n");
|
||||||
|
|
||||||
virBufferVSprintf(&buf, " <driver name='%s'",
|
if (driver || subdriver)
|
||||||
(driver) ? driver : "phy");
|
virBufferVSprintf(&buf, " <driver");
|
||||||
|
|
||||||
|
if (driver)
|
||||||
|
virBufferVSprintf(&buf, " name='%s'", driver);
|
||||||
if (subdriver)
|
if (subdriver)
|
||||||
virBufferVSprintf(&buf, " type='%s'", subdriver);
|
virBufferVSprintf(&buf, " type='%s'", subdriver);
|
||||||
virBufferAddLit(&buf, "/>\n");
|
|
||||||
|
if (driver || subdriver)
|
||||||
|
virBufferAddLit(&buf, "/>\n");
|
||||||
|
|
||||||
virBufferVSprintf(&buf, " <source %s='%s'/>\n",
|
virBufferVSprintf(&buf, " <source %s='%s'/>\n",
|
||||||
(isFile) ? "file" : "dev",
|
(isFile) ? "file" : "dev",
|
||||||
|
Loading…
Reference in New Issue
Block a user