aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-04-02 23:20:09 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2021-04-09 00:10:44 +0200
commit47c7b4fc2496da5df4a4a208b87f271b9efa36c7 (patch)
treedd557f7fc80ac6e97fa8c27292ffd6440b7b6bfa /include/osmocom
parent524b4f802f57305ef16e084fa53db02f7bc87a6b (diff)
add osmo_bts_features_names: short BTS feature strings
This will be used by osmo-bts-omldummy to parse features strings from the cmdline. Note that osmo_bts_feature_name() already exists to return the longer descriptive value_strings from osmo_bts_features_descs (_descs!). Luckily that misses the plural 'features' in the name, so that I can still add a properly named osmo_bts_features_name() function that only returns the name, matching the common pattern used in osmocom code. Related: SYS#4895 Change-Id: I699cd27512887d64d824be680303e70fff3677c1
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/gsm/bts_features.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/gsm/bts_features.h b/include/osmocom/gsm/bts_features.h
index b174d3f1..93d35f3a 100644
--- a/include/osmocom/gsm/bts_features.h
+++ b/include/osmocom/gsm/bts_features.h
@@ -40,6 +40,11 @@ static inline const char *osmo_bts_features_desc(enum osmo_bts_features val)
const char *osmo_bts_feature_name(enum osmo_bts_features feature)
OSMO_DEPRECATED("Use osmo_bts_features_desc() instead");
+extern const struct value_string osmo_bts_features_names[];
+
+static inline const char *osmo_bts_features_name(enum osmo_bts_features val)
+{ return get_value_string(osmo_bts_features_names, val); }
+
static inline int osmo_bts_set_feature(struct bitvec *features, enum osmo_bts_features feature)
{
OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES);