[libvirt] [PATCH] Don't validate disk type in virsh attach-disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Let the underlying driver tell us what it supports. At the moment
we are at least erroneously denying floppy eject/insert.

Last time I posted this, it was pointed out that 'type' now needs to
be properly escaped for use in the xml: while true, that's a problem
in numerous other places in virsh, so I've skipped it with this patch.
---
 src/virsh.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/src/virsh.c b/src/virsh.c
index ce90d3d..865b6e5 100644
--- a/src/virsh.c
+++ b/src/virsh.c
@@ -5509,13 +5509,6 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
     type = vshCommandOptString(cmd, "type", NULL);
     mode = vshCommandOptString(cmd, "mode", NULL);
 
-    if (type) {
-        if (STRNEQ(type, "cdrom") && STRNEQ(type, "disk")) {
-            vshError(ctl, FALSE, _("No support %s in command 'attach-disk'"), type);
-            goto cleanup;
-        }
-    }
-
     if (driver) {
         if (STREQ(driver, "file") || STREQ(driver, "tap")) {
             isFile = 1;
-- 
1.6.2.2

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]