mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-31 14:23:53 -06:00
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 <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Peter Krempa <pkrempa@redhat.com> Acked-by: Peter Krempa <pkrempa@redhat.com> Message-Id: <20211025042405.3762351-5-armbru@redhat.com>
This commit is contained in:
parent
ed29bb28f8
commit
aa2370444b
4 changed files with 38 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue