mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-30 16:35:24 +00:00
include: error: Add enum sentinel for virErrorNumber enum
We do have one for the error domain but not for the error number itself. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
568a417224
commit
590cc60de5
@ -321,6 +321,11 @@ typedef enum {
|
||||
VIR_ERR_DEVICE_MISSING = 99, /* fail to find the desired device */
|
||||
VIR_ERR_INVALID_NWFILTER_BINDING = 100, /* invalid nwfilter binding */
|
||||
VIR_ERR_NO_NWFILTER_BINDING = 101, /* no nwfilter binding */
|
||||
|
||||
# ifdef VIR_ENUM_SENTINELS
|
||||
VIR_ERR_NUMBER_LAST
|
||||
# endif
|
||||
|
||||
} virErrorNumber;
|
||||
|
||||
/**
|
||||
|
@ -914,6 +914,7 @@ virErrorMsg(virErrorNumber error, const char *info)
|
||||
const char *errmsg = NULL;
|
||||
|
||||
switch (error) {
|
||||
case VIR_ERR_NUMBER_LAST:
|
||||
case VIR_ERR_OK:
|
||||
return NULL;
|
||||
case VIR_ERR_INTERNAL_ERROR:
|
||||
|
Loading…
x
Reference in New Issue
Block a user