virsh attempts to validate the requested disk type, rather than just let
the underlying driver do it. This was erroneously denying floppy device
attaches. Patch attached.

Thanks,
Cole
commit 3481061f6ed960269d9b29a4a1380367d557cf37
Author: Cole Robinson <crobi...@redhat.com>
Date:   Fri Feb 27 10:47:49 2009 -0500

    Let virt driver validate disk type for us in virsh attach-disk.

diff --git a/src/virsh.c b/src/virsh.c
index 298dde0..5c9c49f 100644
--- a/src/virsh.c
+++ b/src/virsh.c
@@ -5022,13 +5022,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;
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to