From 80bab3970ae45cd0bc5225ea87e8bcb2bd961260 Mon Sep 17 00:00:00 2001
Message-Id: <80bab3970ae45cd0bc5225ea87e8bcb2bd961260.1424280081.git.jen@redhat.com>
In-Reply-To: <54163d537ed24926effb0783707492d2988ecbe8.1424280081.git.jen@redhat.com>
References: <54163d537ed24926effb0783707492d2988ecbe8.1424280081.git.jen@redhat.com>
From: John Snow <jsnow@redhat.com>
Date: Thu, 12 Feb 2015 21:03:23 -0500
Subject: [CHANGE 8/8] qemu-options.hx: conditionally remove bps and iops
 options from -help
To: rhvirt-patches@redhat.com,
    jen@redhat.com

RH-Author: John Snow <jsnow@redhat.com>
Message-id: <1423775003-12629-1-git-send-email-jsnow@redhat.com>
Patchwork-id: 63805
O-Subject: [RHEL-6.7 qemu-kvm PATCH] 1134230: conditionally remove bps and iops options from -help
Bugzilla: 1134230
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Acked-by: Fam Zheng <famz@redhat.com>

Upstream: N/A
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1134230
Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=8731338

The various bps/iops tuning parameters have been put behind a
configuration option downstream since Fam's 6b1eb15c patch.

libvirt apparently uses the qemu help output to determine which features are
available in the qemu binary, so we must also conditionally hide the helptext
generated as well.
---
 qemu-options.hx | 2 ++
 1 file changed, 2 insertions(+)

Signed-off-by: Jeff E. Nelson <jen@redhat.com>
---
 qemu-options.hx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/qemu-options.hx b/qemu-options.hx
index 8fdf2eb..11af97a 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -105,7 +105,9 @@ DEF("drive", HAS_ARG, QEMU_OPTION_drive,
     "       [,cache=writethrough|writeback|none|directsync|unsafe][,format=f]\n"
     "       [,serial=s][,addr=A][,id=name][,aio=threads|native]\n"
     "       [,readonly=on|off][,copy-on-read=on|off]\n"
+#ifdef CONFIG_BLOCK_IO_THROTTLING
     "       [[,bps=b]|[[,bps_rd=r][,bps_wr=w]]][[,iops=i]|[[,iops_rd=r][,iops_wr=w]]\n"
+#endif
     "                use 'file' as a drive image\n")
 STEXI
 @item -drive @var{option}[,@var{option}[,@var{option}[,...]]]
-- 
2.1.0

