mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 02:58:29 +00:00
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]
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user