summaryrefslogtreecommitdiffstats
path: root/src/vty
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther2010-08-25 11:34:56 +0200
committerHolger Hans Peter Freyther2010-08-26 09:00:52 +0200
commit8f09f01380dc6c798782fc06bf51e90bd5f7cf40 (patch)
treee722ad668713dfd0b21397c4c12840d460aec82a /src/vty
parentvty: Move the assumption of the config nodes into a function (diff)
downloadlibosmocore-8f09f01380dc6c798782fc06bf51e90bd5f7cf40.tar.gz
libosmocore-8f09f01380dc6c798782fc06bf51e90bd5f7cf40.tar.xz
libosmocore-8f09f01380dc6c798782fc06bf51e90bd5f7cf40.zip
vty: Add a new callback to let code decide if it is a config node or not
Diffstat (limited to 'src/vty')
-rw-r--r--src/vty/command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vty/command.c b/src/vty/command.c
index bec28a0..6a52321 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -141,6 +141,10 @@ static int cmp_desc(const void *p, const void *q)
static int is_config(struct vty *vty)
{
+ /* ask the application */
+ if (host.app_info->is_config_node)
+ return host.app_info->is_config_node(vty, vty->node);
+
/* Assume that everything above CONFIG_NODE is a config node */
return vty->node > CONFIG_NODE;
}