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

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



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 <crobinso 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;

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