From 7ce5fc63c75d0ac756fd0b4d0472774de17f8fec Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 28 Oct 2021 12:25:19 +0200 Subject: qapi: Factor out compat_policy_input_ok() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code to check policy for handling deprecated input is triplicated. Factor it out into compat_policy_input_ok() before I mess with it in the next commit. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211028102520.747396-9-armbru@redhat.com> [Policy code moved from qmp-dispatch.c to qapi-util.c to make visitors link without qmp-dispatch.o] --- include/qapi/compat-policy.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/qapi/compat-policy.h b/include/qapi/compat-policy.h index 1083f95..8b7b25c 100644 --- a/include/qapi/compat-policy.h +++ b/include/qapi/compat-policy.h @@ -13,10 +13,17 @@ #ifndef QAPI_COMPAT_POLICY_H #define QAPI_COMPAT_POLICY_H +#include "qapi/error.h" #include "qapi/qapi-types-compat.h" extern CompatPolicy compat_policy; +bool compat_policy_input_ok(unsigned special_features, + const CompatPolicy *policy, + ErrorClass error_class, + const char *kind, const char *name, + Error **errp); + /* * Create a QObject input visitor for @obj for use with QMP * -- cgit v1.1