confnode_check_deps(n, 1);
}
-void __conf_display_path(const struct confnode *n)
+static void __conf_display_path(const struct confnode *n, int first)
{
if (n->parent)
- __conf_display_path(n->parent);
+ __conf_display_path(n->parent, 0);
if (n->flags & CONFNODE_F_IS_ROOT)
printf("/");
else if (!(n->flags & CONFNODE_F_INVISIBLE))
- printf("%s/", n->name);
+ printf("%s%s", n->name, first ? "" : "/" );
}
/* show path: used by the 'pwd' command. Nodes like 'if' are
* ignored. */
void conf_display_path(const struct confnode *n)
{
- __conf_display_path(n);
+ __conf_display_path(n, 1);
printf("\n");
}