提交 226094fb 编写于 作者: P Peter Krempa

error: Add VIR_ERR_DEPRECATED error code

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 738dc3f4
...@@ -329,6 +329,7 @@ typedef enum { ...@@ -329,6 +329,7 @@ typedef enum {
VIR_ERR_INVALID_NETWORK_PORT = 105, /* invalid network port object */ VIR_ERR_INVALID_NETWORK_PORT = 105, /* invalid network port object */
VIR_ERR_NETWORK_PORT_EXIST = 106, /* the network port already exist */ VIR_ERR_NETWORK_PORT_EXIST = 106, /* the network port already exist */
VIR_ERR_NO_NETWORK_PORT = 107, /* network port not found */ 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 # ifdef VIR_ENUM_SENTINELS
VIR_ERR_NUMBER_LAST VIR_ERR_NUMBER_LAST
......
...@@ -1235,6 +1235,10 @@ const virErrorMsgTuple virErrorMsgStrings[VIR_ERR_NUMBER_LAST] = { ...@@ -1235,6 +1235,10 @@ const virErrorMsgTuple virErrorMsgStrings[VIR_ERR_NUMBER_LAST] = {
[VIR_ERR_NO_NETWORK_PORT] = { [VIR_ERR_NO_NETWORK_PORT] = {
N_("network port not found"), N_("network port not found"),
N_("network port not found: %s") }, N_("network port not found: %s") },
[VIR_ERR_DEPRECATED] = {
N_("operation or configuration no longer supported"),
"%s",
},
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册