vty: Provide a is_config_node for the VTY and use it for the bsc
Right now only bsc_hack and osmo_bsc need to have a custom
config handling as they use the subscr/oml nodes.
diff --git a/openbsc/src/common_vty.c b/openbsc/src/common_vty.c
index 3c257a8..9d22146 100644
--- a/openbsc/src/common_vty.c
+++ b/openbsc/src/common_vty.c
@@ -185,3 +185,15 @@
return CMD_SUCCESS;
}
+int bsc_vty_is_config_node(struct vty *vty, int node)
+{
+ switch (node) {
+ /* add items that are not config */
+ case OML_NODE:
+ case SUBSCR_NODE:
+ return 0;
+
+ default:
+ return 1;
+ }
+}