From aa2370444b62f8f9a809c024d0c41cb40658a5c3 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 25 Oct 2021 06:24:04 +0200 Subject: qapi: Implement deprecated-input={reject,crash} for enum values This copies the code implementing the policy from qapi/qmp-dispatch.c to qapi/qobject-input-visitor.c. Tolerable, but if we acquire more copies, we should look into factoring them out. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Tested-by: Peter Krempa Acked-by: Peter Krempa Message-Id: <20211025042405.3762351-5-armbru@redhat.com> --- include/qapi/util.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/qapi/util.h') diff --git a/include/qapi/util.h b/include/qapi/util.h index d7bfb30e25..257c600f99 100644 --- a/include/qapi/util.h +++ b/include/qapi/util.h @@ -11,9 +11,13 @@ #ifndef QAPI_UTIL_H #define QAPI_UTIL_H +/* QEnumLookup flags */ +#define QAPI_ENUM_DEPRECATED 1 + typedef struct QEnumLookup { const char *const *array; - int size; + const unsigned char *const flags; + const int size; } QEnumLookup; const char *qapi_enum_lookup(const QEnumLookup *lookup, int val); -- cgit v1.2.3-55-g7522