summaryrefslogtreecommitdiff
path: root/lib/command.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/command.h')
-rw-r--r--lib/command.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/command.h b/lib/command.h
index b002e79f09..6acaa450c2 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -239,7 +239,11 @@ struct cmd_node {
.attr = attrs, \
.daemon = dnum, \
.name = #cmdname, \
- };
+ .xref = XREF_INIT(XREFT_DEFUN, NULL, #funcname), \
+ }; \
+ XREF_LINK(cmdname.xref); \
+ /* end */
+
#define DEFUN_CMD_FUNC_DECL(funcname) \
static int funcname(const struct cmd_element *, struct vty *, int, \