diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-02-10 16:42:49 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-02-10 16:44:28 +0100 |
| commit | db85c8b38418cf28fb7acacb6ad59614817db5e5 (patch) | |
| tree | 318303260ce34a8f95916fc9310f701b7055961f /lib/command.h | |
| parent | fdc3d1ab837a81d27ab10d0bf65f349263870154 (diff) | |
lib: track name of command in cmd_element
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/command.h')
| -rw-r--r-- | lib/command.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/command.h b/lib/command.h index 7986c676fc..29283418ce 100644 --- a/lib/command.h +++ b/lib/command.h @@ -220,6 +220,8 @@ struct cmd_element /* handler function for command */ int (*func) (const struct cmd_element *, struct vty *, int, struct cmd_token *[]); + + const char *name; /* symbol name for debugging */ }; /* Return value of the commands. */ @@ -252,6 +254,7 @@ struct cmd_element .doc = helpstr, \ .attr = attrs, \ .daemon = dnum, \ + .name = #cmdname, \ }; #define DEFUN_CMD_FUNC_DECL(funcname) \ |
