]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: implement DEFPY_NOSH
authorRenato Westphal <renato@opensourcerouting.org>
Sun, 8 Jul 2018 22:02:36 +0000 (19:02 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Mon, 13 Aug 2018 21:59:31 +0000 (18:59 -0300)
This is the DEFPY equivalent of DEFUN_NOSH.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/command.h
lib/defun_lex.l

index a001a90e2e4641976cea82f31fa3413c27d82710..da9b92ec6db2bb9a4227f02fa51a139fd2bcca32 100644 (file)
@@ -220,6 +220,9 @@ struct cmd_node {
        DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, 0, 0)            \
        funcdecl_##funcname
 
+#define DEFPY_NOSH(funcname, cmdname, cmdstr, helpstr)                         \
+       DEFPY(funcname, cmdname, cmdstr, helpstr)
+
 #define DEFPY_ATTR(funcname, cmdname, cmdstr, helpstr, attr)                   \
        DEFUN_CMD_ELEMENT(funcname, cmdname, cmdstr, helpstr, attr, 0)         \
        funcdecl_##funcname
@@ -302,6 +305,9 @@ struct cmd_node {
 #define DEFPY(funcname, cmdname, cmdstr, helpstr)                              \
        DEFUN(funcname, cmdname, cmdstr, helpstr)
 
+#define DEFPY_NOSH(funcname, cmdname, cmdstr, helpstr)                         \
+       DEFUN_NOSH(funcname, cmdname, cmdstr, helpstr)
+
 #define DEFPY_ATTR(funcname, cmdname, cmdstr, helpstr, attr)                   \
        DEFUN_ATTR(funcname, cmdname, cmdstr, helpstr, attr)
 #endif /* VTYSH_EXTRACT_PL */
index 9c995db266392cc41461e0fd447f762e88c0b591..d901c26a2ed336ad37eefd66984e359b0e0dd246 100644 (file)
@@ -132,6 +132,7 @@ SPECIAL             [(),]
 "DEFUN_NOSH"                   value = strdup(yytext); return DEFUNNY;
 "DEFUN_HIDDEN"                 value = strdup(yytext); return DEFUNNY;
 "DEFPY"                                value = strdup(yytext); return DEFUNNY;
+"DEFPY_NOSH"                   value = strdup(yytext); return DEFUNNY;
 "DEFPY_ATTR"                   value = strdup(yytext); return DEFUNNY;
 "DEFPY_HIDDEN"                 value = strdup(yytext); return DEFUNNY;
 "ALIAS"                                value = strdup(yytext); return DEFUNNY;