mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 06:34:44 +00:00
lib: track name of command in cmd_element
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
fdc3d1ab83
commit
db85c8b384
@ -220,6 +220,8 @@ struct cmd_element
|
|||||||
|
|
||||||
/* handler function for command */
|
/* handler function for command */
|
||||||
int (*func) (const struct cmd_element *, struct vty *, int, struct cmd_token *[]);
|
int (*func) (const struct cmd_element *, struct vty *, int, struct cmd_token *[]);
|
||||||
|
|
||||||
|
const char *name; /* symbol name for debugging */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Return value of the commands. */
|
/* Return value of the commands. */
|
||||||
@ -252,6 +254,7 @@ struct cmd_element
|
|||||||
.doc = helpstr, \
|
.doc = helpstr, \
|
||||||
.attr = attrs, \
|
.attr = attrs, \
|
||||||
.daemon = dnum, \
|
.daemon = dnum, \
|
||||||
|
.name = #cmdname, \
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DEFUN_CMD_FUNC_DECL(funcname) \
|
#define DEFUN_CMD_FUNC_DECL(funcname) \
|
||||||
|
Loading…
Reference in New Issue
Block a user