diff options
Diffstat (limited to 'qapi/qapi-util.c')
-rw-r--r-- | qapi/qapi-util.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c index ee7594ff19..7af2f04d36 100644 --- a/qapi/qapi-util.c +++ b/qapi/qapi-util.c @@ -13,7 +13,13 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu-common.h" -#include "qapi/util.h" + +const char *qapi_enum_lookup(const char *const lookup[], int val) +{ + assert(val >= 0); + + return lookup[val]; +} int qapi_enum_parse(const char * const lookup[], const char *buf, int def, Error **errp) |