]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Don't validate disk type in virsh attach-disk
authorCole Robinson <crobinso@redhat.com>
Tue, 19 May 2009 13:04:46 +0000 (13:04 +0000)
committerCole Robinson <crobinso@redhat.com>
Tue, 19 May 2009 13:04:46 +0000 (13:04 +0000)
Let the underlying driver tell us what it supports. At the moment
we are at least erroneously denying floppy eject/insert.

ChangeLog
src/virsh.c

index 4dbc5dad1bcd875b5d6ef48b6ee84c1511537002..9d516014cbe26fd2d068b8befdd29e14bcb287a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue May 19 09:04:05 EDT 2009 Cole Robinson <crobinso@redhat.com>
+
+       * src/virsh.c: Don't validate disk type in virsh attach-disk
+
 Tue May 19 09:00:43 EDT 2009 Cole Robinson <crobinso@redhat.com>
 
        * python/libvir.py: Don't overwrite legitimate python import error.
index ce90d3d856deada4e4b3c25410ba8dfc070008a0..865b6e53196ec57e3d93a75bc1183c79d33215d6 100644 (file)
@@ -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;