]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: extension of virsh attach-disk for rawio
authorTaku Izumi <izumi.taku@jp.fujitsu.com>
Fri, 3 Feb 2012 04:33:13 +0000 (13:33 +0900)
committerLaine Stump <laine@laine.org>
Fri, 3 Feb 2012 16:50:29 +0000 (11:50 -0500)
This patch extends "virsh attach-disk" command so that
we can specify "rawio" attribute.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
tools/virsh.c
tools/virsh.pod

index 73c1ebe845973d18d88a36960dfc522ca5fb5cda..42985a9217a60231bcbf7e8398bc3749e5433a00 100644 (file)
@@ -13885,6 +13885,7 @@ static const vshCmdOptDef opts_attach_disk[] = {
     {"sourcetype", VSH_OT_STRING, 0, N_("type of source (block|file)")},
     {"serial", VSH_OT_STRING, 0, N_("serial of disk device")},
     {"shareable", VSH_OT_BOOL, 0, N_("shareable between domains")},
+    {"rawio", VSH_OT_BOOL, 0, N_("needs rawio capability")},
     {"address", VSH_OT_STRING, 0, N_("address of disk device")},
     {"multifunction", VSH_OT_BOOL, 0,
      N_("use multifunction pci under specified address")},
@@ -14104,6 +14105,8 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
                       (isFile) ? "file" : "block");
     if (type)
         virBufferAsprintf(&buf, " device='%s'", type);
+    if (vshCommandOptBool (cmd, "rawio"))
+        virBufferAddLit(&buf, " rawio='yes'");
     virBufferAddLit(&buf, ">\n");
 
     if (driver || subdriver)
index 28ad4228ff02e4fa0de686a98001741ff28f8577..10b51ff74021b54db24bbd4ccc9a81b2f13d85c8 100644 (file)
@@ -1404,7 +1404,7 @@ the device does not use managed mode.
 =item B<attach-disk> I<domain-id> I<source> I<target>
 [I<--driver driver>] [I<--subdriver subdriver>] [I<--cache cache>]
 [I<--type type>] [I<--mode mode>] [I<--persistent>] [I<--sourcetype soucetype>]
-[I<--serial serial>] [I<--shareable>] [I<--address address>]
+[I<--serial serial>] [I<--shareable>] [I<--rawio>] [I<--address address>]
 [I<--multifunction>]
 
 Attach a new disk device to the domain.
@@ -1421,6 +1421,7 @@ I<cache> can be one of "default", "none", "writethrough", "writeback",
 "directsync" or "unsafe".
 I<serial> is the serial of disk device. I<shareable> indicates the disk device
 is shareable between domains.
+I<rawio> indicates the disk needs rawio capability.
 I<address> is the address of disk device in the form of pci:domain.bus.slot.function,
 scsi:controller.bus.unit or ide:controller.bus.unit.
 I<multifunction> indicates specified pci address is a multifunction pci device