libubus: introduce new status messages

Introduce the following new status messages in libubus:

UBUS_STATUS_NO_MEMORY
UBUS_STATUS_PARSE_ERROR
UBUS_STATUS_SYSTEM_ERROR

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Stijn Tintel 2022-02-18 18:13:56 +02:00
parent a72457b61d
commit 66baa44b8d
2 changed files with 6 additions and 0 deletions

View file

@ -34,6 +34,9 @@ const char *__ubus_strerror[__UBUS_STATUS_LAST] = {
[UBUS_STATUS_NOT_SUPPORTED] = "Operation not supported",
[UBUS_STATUS_UNKNOWN_ERROR] = "Unknown error",
[UBUS_STATUS_CONNECTION_FAILED] = "Connection failed",
[UBUS_STATUS_NO_MEMORY] = "Out of memory",
[UBUS_STATUS_PARSE_ERROR] = "Parsing message data failed",
[UBUS_STATUS_SYSTEM_ERROR] = "System error",
};
struct blob_buf b __hidden = {};

View file

@ -127,6 +127,9 @@ enum ubus_msg_status {
UBUS_STATUS_NOT_SUPPORTED,
UBUS_STATUS_UNKNOWN_ERROR,
UBUS_STATUS_CONNECTION_FAILED,
UBUS_STATUS_NO_MEMORY,
UBUS_STATUS_PARSE_ERROR,
UBUS_STATUS_SYSTEM_ERROR,
__UBUS_STATUS_LAST
};