Merge commit '52b4abdcb351830f5493a50c4181ef3947f3feab'
diff --git a/libosmocore/src/utils.c b/libosmocore/src/utils.c
index 2a73d39..4dab064 100644
--- a/libosmocore/src/utils.c
+++ b/libosmocore/src/utils.c
@@ -2,9 +2,11 @@
#include <string.h>
#include <stdint.h>
#include <errno.h>
+#include <stdio.h>
#include <osmocore/utils.h>
+static char namebuf[255];
const char *get_value_string(const struct value_string *vs, uint32_t val)
{
int i;
@@ -15,7 +17,9 @@
if (vs[i].value == val)
return vs[i].str;
}
- return "unknown";
+
+ snprintf(namebuf, sizeof(namebuf), "unknown 0x%x", val);
+ return namebuf;
}
int get_string_value(const struct value_string *vs, const char *str)