diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-03-01 21:59:06 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-03-01 21:59:06 +0100 |
commit | 2e411c7b0d24639968b0e551f4bf1c1e2627caf7 (patch) | |
tree | 15e9a1de26524176407e276ee7f57723df19753c /openbsc/src/debug.c | |
parent | 8b0079909d1ae229862e3372dbfb26955772725d (diff) |
value_string functions and some RSL related stuff has moved to libosmocore
Diffstat (limited to 'openbsc/src/debug.c')
-rw-r--r-- | openbsc/src/debug.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/openbsc/src/debug.c b/openbsc/src/debug.c index 7488cd63a..6d67ac1d3 100644 --- a/openbsc/src/debug.c +++ b/openbsc/src/debug.c @@ -29,6 +29,7 @@ #include <openbsc/debug.h> #include <osmocore/talloc.h> +#include <osmocore/utils.h> #include <openbsc/gsm_data.h> #include <openbsc/gsm_subscriber.h> @@ -56,32 +57,6 @@ static struct debug_category default_categories[Debug_LastEntry] = { [DREF] = { .enabled = 0, .loglevel = LOGL_NOTICE }, }; -const char *get_value_string(const struct value_string *vs, u_int32_t val) -{ - int i; - - for (i = 0;; i++) { - if (vs[i].value == 0 && vs[i].str == NULL) - break; - if (vs[i].value == val) - return vs[i].str; - } - return "unknown"; -} - -int get_string_value(const struct value_string *vs, const char *str) -{ - int i; - - for (i = 0;; i++) { - if (vs[i].value == 0 && vs[i].str == NULL) - break; - if (!strcasecmp(vs[i].str, str)) - return vs[i].value; - } - return -EINVAL; -} - struct debug_info { const char *name; const char *color; |