diff mbox

[v2,42/54] qapi2texi: add 'If:' condition to enum values

Message ID 20170822132255.23945-43-marcandre.lureau@redhat.com
State New
Headers show

Commit Message

Marc-André Lureau Aug. 22, 2017, 1:22 p.m. UTC
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 scripts/qapi2texi.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/scripts/qapi2texi.py b/scripts/qapi2texi.py
index 3a923ce438..8959cb0cdf 100755
--- a/scripts/qapi2texi.py
+++ b/scripts/qapi2texi.py
@@ -130,7 +130,9 @@  def texi_body(doc):
 
 def texi_enum_value(value):
     """Format a table of members item for an enumeration value"""
-    return '@item @code{%s}\n' % value.name
+    return '@item @code{%s}%s\n' % (
+        value.name,
+        '\n@b{If:} @code{%s}\n' % value.ifcond if value.ifcond else '')
 
 def texi_member(member, suffix=''):
     """Format a table of members item for an object type member"""