Change in osmo-e1d[master]: print E1DP Mode as string, not in numeric format

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Jul 12 12:22:21 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/19219 )

Change subject: print E1DP Mode as string, not in numeric format
......................................................................

print E1DP Mode as string, not in numeric format

Change-Id: I4d221a45bdd5d85b3ab6eaa35d67683b50bea21f
---
M src/ctl.c
M src/e1d.h
M src/vty.c
3 files changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/ctl.c b/src/ctl.c
index 0fb42de..ee5066f 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -111,7 +111,7 @@
 {
 	int ret, sd[2];
 
-	LOGPTS(ts, DE1D, LOGL_INFO, "Starting in mode %u\n", mode);
+	LOGPTS(ts, DE1D, LOGL_INFO, "Starting in mode %s\n", get_value_string(e1_ts_mode_names, mode));
 
 	ret = socketpair(AF_UNIX, SOCK_SEQPACKET, 0, sd);
 	if (ret < 0)
diff --git a/src/e1d.h b/src/e1d.h
index 64e8f45..f556e8f 100644
--- a/src/e1d.h
+++ b/src/e1d.h
@@ -33,6 +33,7 @@
 	E1_TS_MODE_RAW,
 	E1_TS_MODE_HDLCFCS,
 };
+extern const struct value_string e1_ts_mode_names[];
 
 struct e1_ts {
 	struct e1_line *line;
diff --git a/src/vty.c b/src/vty.c
index cc0df21..5e3f37c 100644
--- a/src/vty.c
+++ b/src/vty.c
@@ -86,7 +86,7 @@
 	return uc.pid;
 }
 
-static const struct value_string e1_ts_mode_names[] = {
+const struct value_string e1_ts_mode_names[] = {
 	{ E1_TS_MODE_OFF,	"OFF" },
 	{ E1_TS_MODE_RAW,	"RAW" },
 	{ E1_TS_MODE_HDLCFCS,	"HDLC-FCS" },

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/19219
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: I4d221a45bdd5d85b3ab6eaa35d67683b50bea21f
Gerrit-Change-Number: 19219
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: tnt <tnt at 246tNt.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200712/96c1314b/attachment.htm>


More information about the gerrit-log mailing list