aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-04-08 21:12:55 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2021-04-08 23:11:45 +0200
commit524b4f802f57305ef16e084fa53db02f7bc87a6b (patch)
tree1fa757469ad8af5505b66a2a29af81ca45121acb
parentd4393608a4102acc666622d7e233f3586ba27d6e (diff)
deprecate osmo_bts_feature_name(), add osmo_bts_features_desc()
The function osmo_bts_feature_name() is ill-named for two reasons: - it returns descriptive text instead of just a string representation of the name. - The enum is named "osmo_bts_features", so the function name lacks the "s" for "features". Rationale: An upcoming patch adds a function to return just the name, properly called osmo_bts_features_name(), so deprecate the weirdly named one first. Change-Id: I9dfdb5e81037b6000effbd340af4e5db0dcfd69c
-rw-r--r--include/osmocom/gsm/bts_features.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/osmocom/gsm/bts_features.h b/include/osmocom/gsm/bts_features.h
index ac2c7606..b174d3f1 100644
--- a/include/osmocom/gsm/bts_features.h
+++ b/include/osmocom/gsm/bts_features.h
@@ -34,7 +34,11 @@ enum osmo_bts_features {
extern const struct value_string osmo_bts_features_descs[];
-const char *osmo_bts_feature_name(enum osmo_bts_features feature);
+static inline const char *osmo_bts_features_desc(enum osmo_bts_features val)
+{ return get_value_string(osmo_bts_features_descs, val); }
+
+const char *osmo_bts_feature_name(enum osmo_bts_features feature)
+ OSMO_DEPRECATED("Use osmo_bts_features_desc() instead");
static inline int osmo_bts_set_feature(struct bitvec *features, enum osmo_bts_features feature)
{