diff options
author | Markus Armbruster <armbru@redhat.com> | 2021-10-28 12:25:19 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2021-10-29 21:27:20 +0200 |
commit | 7ce5fc63c75d0ac756fd0b4d0472774de17f8fec (patch) | |
tree | bcab77bc0c0f51f58b4307afc089714bb1f12f00 /include/qapi | |
parent | c8688760437aaf4bfa9012ff5aef8ab1c92a38e1 (diff) |
qapi: Factor out compat_policy_input_ok()
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 <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
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]
Diffstat (limited to 'include/qapi')
-rw-r--r-- | include/qapi/compat-policy.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/qapi/compat-policy.h b/include/qapi/compat-policy.h index 1083f95122..8b7b25c0b5 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 * |