From 082c39587d6f48e79063ab6bafbc061905066601 Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Thu, 5 Jul 2018 11:37:22 -0400 Subject: [PATCH] qapi: restrict allow-oob value to be "true" It was missed in the first version of OOB series. We should check this to make sure we throw the right error when fault value is passed in. Backports commit 9408860165e07aaadec66c336f3dc849b945a8ed from qemu --- qemu/scripts/qapi/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/scripts/qapi/common.py b/qemu/scripts/qapi/common.py index 308d7cd0..f3f2e31b 100644 --- a/qemu/scripts/qapi/common.py +++ b/qemu/scripts/qapi/common.py @@ -878,7 +878,7 @@ def check_keys(expr_elem, meta, required, optional=[]): raise QAPISemError(info, "'%s' of %s '%s' should only use false value" % (key, meta, name)) - if key == 'boxed' and value is not True: + if (key == 'boxed' or key == 'allow-oob') and value is not True: raise QAPISemError(info, "'%s' of %s '%s' should only use true value" % (key, meta, name))