yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 1f33b2998d43cd80ade8887b14b3a606997d0bca Mon Sep 17 00:00:00 2001
From: Jeffrey Cody <jcody@redhat.com>
Date: Mon, 31 Jul 2017 16:25:57 +0200
Subject: [PATCH 15/17] RHEL Diff.: Unregister live block operations

RH-Author: Jeffrey Cody <jcody@redhat.com>
Message-id: <54901950979015a082c63235d9f159e53d3abe28.1501517983.git.jcody@redhat.com>
Patchwork-id: 75874
O-Subject: [Pegas-1.0 qemu-kvm PATCH v4 2/4] RHEL Diff.: Unregister live block operations
Bugzilla: 1418532
RH-Acked-by: Eric Blake <eblake@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>

Commands association with live block operations, and block jobs are
disabled for RHEL.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 monitor.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/monitor.c b/monitor.c
index 715995f..44dc9a3 100644
--- a/monitor.c
+++ b/monitor.c
@@ -999,6 +999,22 @@ static void qmp_unregister_commands_hack(void)
     && !defined(TARGET_S390X)
     qmp_unregister_command(&qmp_commands, "query-cpu-definitions");
 #endif
+#ifndef CONFIG_LIVE_BLOCK_OPS
+    qmp_unregister_command(&qmp_commands, "block-stream");
+    qmp_unregister_command(&qmp_commands, "block-commit");
+    qmp_unregister_command(&qmp_commands, "drive-mirror");
+    qmp_unregister_command(&qmp_commands, "blockdev-mirror");
+    qmp_unregister_command(&qmp_commands, "drive-backup");
+    qmp_unregister_command(&qmp_commands, "blockdev-backup");
+    qmp_unregister_command(&qmp_commands, "blockdev-snapshot");
+    qmp_unregister_command(&qmp_commands, "blockdev-snapshot-sync");
+    qmp_unregister_command(&qmp_commands, "block-job-set-speed");
+    qmp_unregister_command(&qmp_commands, "block-job-cancel");
+    qmp_unregister_command(&qmp_commands, "block-job-pause");
+    qmp_unregister_command(&qmp_commands, "block-job-resume");
+    qmp_unregister_command(&qmp_commands, "block-job-complete");
+    qmp_unregister_command(&qmp_commands, "query-block-jobs");
+#endif
 }
 
 void monitor_init_qmp_commands(void)
-- 
1.8.3.1