Patchwork [3/3] Add qmp version of drive_unplug

login
register
mail settings
Submitter Ryan Harper
Date Oct. 25, 2010, 6:22 p.m.
Message ID <1288030956-28383-4-git-send-email-ryanh@us.ibm.com>
Download mbox | patch
Permalink /patch/69124/
State New
Headers show

Comments

Ryan Harper - Oct. 25, 2010, 6:22 p.m.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
---
 qmp-commands.hx |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

Patch

diff --git a/qmp-commands.hx b/qmp-commands.hx
index 793cf1c..e8f3d4a 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -338,6 +338,32 @@  Example:
 EQMP
 
     {
+        .name       = "drive_unplug",
+        .args_type  = "id:s",
+        .params     = "device",
+        .help       = "unplug block device",
+        .user_print = monitor_user_noop,
+        .mhandler.cmd_new = do_drive_unplug,
+    },
+
+SQMP
+drive unplug
+----------
+
+Unplug a block device.
+
+Arguments:
+
+- "id": the device's ID (json-string)
+
+Example:
+
+-> { "execute": "drive_unplug", "arguments": { "id": "drive-virtio-blk1" } }
+<- { "return": {} }
+
+EQMP
+
+    {
         .name       = "cpu",
         .args_type  = "index:i",
         .params     = "index",