]> xenbits.xensource.com Git - libvirt.git/commitdiff
error: Add VIR_ERR_DEPRECATED error code
authorPeter Krempa <pkrempa@redhat.com>
Fri, 21 Jun 2019 06:28:17 +0000 (08:28 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 26 Jun 2019 06:37:01 +0000 (08:37 +0200)
Allow a simple programatic check that a given feature is no longer
supported by introducing a separate error code for this scenario.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
include/libvirt/virterror.h
src/util/virerror.c

index 102a2573bf828d109c78839b1287984086b84eda..22bc3c2d275741d3a7da541adcafde5032d93c4b 100644 (file)
@@ -329,6 +329,7 @@ typedef enum {
     VIR_ERR_INVALID_NETWORK_PORT = 105, /* invalid network port object */
     VIR_ERR_NETWORK_PORT_EXIST = 106,   /* the network port already exist */
     VIR_ERR_NO_NETWORK_PORT = 107,      /* network port not found */
+    VIR_ERR_DEPRECATED = 108,           /* configuration or operation is no longer supported */
 
 # ifdef VIR_ENUM_SENTINELS
     VIR_ERR_NUMBER_LAST
index dfba8c5712384126888b884e94b668cbda1eb5e7..26f14ddd29af43f8c42a3593c6c77d8cc0c7f926 100644 (file)
@@ -1235,6 +1235,10 @@ const virErrorMsgTuple virErrorMsgStrings[VIR_ERR_NUMBER_LAST] = {
     [VIR_ERR_NO_NETWORK_PORT] = {
         N_("network port not found"),
         N_("network port not found: %s") },
+    [VIR_ERR_DEPRECATED] = {
+        N_("operation or configuration no longer supported"),
+        "%s",
+    },
 };