This error code will be used whenever the user triggers execution of code that's been marked as deprecated. Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- include/libvirt/virterror.h | 1 + src/util/virerror.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 57aadb8d16..780270c4f2 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -323,6 +323,7 @@ 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 */ + VIR_ERR_DEPRECATED_FEATURE = 102, /* deprecated feature */ } virErrorNumber; /** diff --git a/src/util/virerror.c b/src/util/virerror.c index 517e0bde28..f1ee47b309 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -1509,6 +1509,12 @@ virErrorMsg(virErrorNumber error, const char *info) else errmsg = _("Network filter binding not found: %s"); break; + case VIR_ERR_DEPRECATED_FEATURE: + if (info == NULL) + errmsg = _("Deprecated feature"); + else + errmsg = _("Deprecated feature: %s"); + break; } return errmsg; } -- 2.17.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list