[PATCH 1/5] logging: fix missing description of global loglevel

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/OpenBSC@lists.osmocom.org/.

pablo at gnumonks.org pablo at gnumonks.org
Tue May 3 20:40:40 UTC 2011


From: Pablo Neira Ayuso <pablo at gnumonks.org>

OpenBSC> logging level
  all    Global setting for all subsystems <----- this description was missing
  rll    A-bis Radio Link Layer (RLL)
[...]

This problem was introduced by myself in:
"vty: integration with logging framework"
04139f14b6197e3ec996133a945af3fa8a68fb7a
---
 src/logging.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/logging.c b/src/logging.c
index 77c8a50..7b1ab13 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -517,6 +517,7 @@ const char *log_vty_command_description(const struct log_info *info)
 	for (i = 0; i < LOGLEVEL_DEFS; i++)
 		size += strlen(loglevel_descriptions[i]) + 1;
 
+	size += strlen("Global setting for all subsystems") + 1;
 	rem = size;
 	str = talloc_zero_size(NULL, size);
 	if (!str)
@@ -528,6 +529,12 @@ const char *log_vty_command_description(const struct log_info *info)
 		goto err;
 	OSMO_SNPRINTF_RET(ret, rem, offset, len);
 
+	ret = snprintf(str + offset, rem,
+			"Global setting for all subsystems\n");
+	if (ret < 0)
+		goto err;
+	OSMO_SNPRINTF_RET(ret, rem, offset, len);
+
 	for (i = 0; i < info->num_cat; i++) {
 		ret = snprintf(str + offset, rem, "%s\n",
 				info->cat[i].description);
-- 
1.7.2.3





More information about the OpenBSC mailing list