Change in libosmocore[master]: deprecate osmo_bts_feature_name(), add osmo_bts_features_desc()

laforge gerrit-no-reply at
Fri Apr 9 16:12:30 UTC 2021

laforge has submitted this change. ( )

Change subject: deprecate osmo_bts_feature_name(), add osmo_bts_features_desc()

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
M include/osmocom/gsm/bts_features.h
1 file changed, 5 insertions(+), 1 deletion(-)

  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve

diff --git a/include/osmocom/gsm/bts_features.h b/include/osmocom/gsm/bts_features.h
index ac2c760..b174d3f 100644
--- a/include/osmocom/gsm/bts_features.h
+++ b/include/osmocom/gsm/bts_features.h
@@ -34,7 +34,11 @@
 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)

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I9dfdb5e81037b6000effbd340af4e5db0dcfd69c
Gerrit-Change-Number: 23682
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at>
Gerrit-Reviewer: laforge <laforge at>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list