fixeria submitted this change.
vty: clarify deprecation messages
When starting osmo-cbc with an old config file, it's unclear which
commands exactly are triggering deprecation warnings. Let's print
the actual command instead of confusing 'This function'.
Change-Id: I7d45292065950846e5e28eb2b21abcdb0707a9b3
---
M src/cbc_vty.c
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/cbc_vty.c b/src/cbc_vty.c
index 12b7d7b..0ac9268 100644
--- a/src/cbc_vty.c
+++ b/src/cbc_vty.c
@@ -551,9 +551,10 @@
{
struct cbc_peer *peer;
- vty_out(vty, "%% This function is deprecated, use "
+ vty_out(vty, "%% '%s' is deprecated, use "
"'peer " CBC_PEER_PROTO_NAME_VTY_CMD " NAME' instead. "
- "Assuming 'cbsp' for peers being created%s", VTY_NEWLINE);
+ "Assuming 'cbsp' for peers being created%s",
+ self->string, VTY_NEWLINE);
peer = cbc_peer_by_name(argv[0]);
if (!peer)
@@ -629,8 +630,9 @@
"Configure Protocol of Peer\n"
CBC_PEER_PROTO_NAME_VTY_STR)
{
- vty_out(vty, "%% This function is deprecated and does nothing, use "
- "'peer " CBC_PEER_PROTO_NAME_VTY_CMD " NAME' instead%s", VTY_NEWLINE);
+ vty_out(vty, "%% '%s' is deprecated and does nothing, use "
+ "'peer " CBC_PEER_PROTO_NAME_VTY_CMD " NAME' instead%s",
+ self->string, VTY_NEWLINE);
return CMD_SUCCESS;
}
To view, visit change 40731. To unsubscribe, or for help writing mail filters, visit settings.