libubus: introduce new status messages
authorStijn Tintel <stijn@linux-ipv6.be>
Fri, 18 Feb 2022 16:13:56 +0000 (18:13 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Mon, 28 Feb 2022 14:07:18 +0000 (16:07 +0200)
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>
libubus.c
ubusmsg.h

index aee2a3b722a7d30756fe6a2ceac081c1775326c7..fc0d933894dd7ee9fb11a32414eba95952597f96 100644 (file)
--- a/libubus.c
+++ b/libubus.c
@@ -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 = {};
index 398b126b6dc01833937749a110181ea0debb1476..b2df8dc295f84886dac864ee37cd46e24083eab3 100644 (file)
--- a/ubusmsg.h
+++ b/ubusmsg.h
@@ -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
 };