diff options
| author | Mark Stapp <mjs@voltanet.io> | 2021-04-15 14:17:02 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2021-04-15 14:17:02 -0400 |
| commit | 90b0718e0766492d64fc505a470d8c2e304bc0b2 (patch) | |
| tree | c10da92c18267e9c38a932cac3b51470043a1271 /lib/zclient.h | |
| parent | 53c42c82deb8e5ee882726c97e62b21e25b03b15 (diff) | |
lib: add 2string for zapi nhg result codes
Add a utility '2string' function for daemon nhg result codes.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'lib/zclient.h')
| -rw-r--r-- | lib/zclient.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/zclient.h b/lib/zclient.h index bd952ea1e6..3d8500e9f1 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -742,6 +742,29 @@ enum zclient_send_status { }; static inline const char * +zapi_nhg_notify_owner2str(enum zapi_nhg_notify_owner note) +{ + const char *ret = "UNKNOWN"; + + switch (note) { + case ZAPI_NHG_FAIL_INSTALL: + ret = "ZAPI_NHG_FAIL_INSTALL"; + break; + case ZAPI_NHG_INSTALLED: + ret = "ZAPI_NHG_INSTALLED"; + break; + case ZAPI_NHG_REMOVE_FAIL: + ret = "ZAPI_NHG_REMOVE_FAIL"; + break; + case ZAPI_NHG_REMOVED: + ret = "ZAPI_NHG_REMOVED"; + break; + } + + return ret; +} + +static inline const char * zapi_rule_notify_owner2str(enum zapi_rule_notify_owner note) { const char *ret = "UNKNOWN"; |
