[libvirt] [PATCH] virsh: Remove using phy as default disk driver in cmdAttachDisk

Eric Blake eblake at redhat.com
Thu Dec 2 02:10:43 UTC 2010


On 12/01/2010 06:19 PM, Osier Yang wrote:
> * 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)
> ---
>  tools/virsh.c |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/virsh.c b/tools/virsh.c
> index 6a9aba2..5b5c5ee 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -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);

This generates two spaces instead of 1.  I've cleanup up the driver line.

ACK with that nit fixed, and pushed.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101201/db827c14/attachment-0001.sig>


More information about the libvir-list mailing list