From: Daniel Walton Date: Mon, 18 Sep 2017 15:07:40 +0000 (+0000) Subject: lib: CMD_FERR_RETURN should return CMD_WARNING_CONFIG_FAILED X-Git-Tag: frr-4.0-dev~294^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F1192%2Fhead;p=mirror%2Ffrr.git lib: CMD_FERR_RETURN should return CMD_WARNING_CONFIG_FAILED Signed-off-by: Daniel Walton Testing the patch: root@cel-redxp-10[frr-dwalton76]# vtysh -c 'conf t' -c ' int vlan2' -c 'ip igmp join 233.200.0.1 10.1.1.1' Failure joining IGMP group: multicast not enabled on interface vlan2 root@cel-redxp-10[frr-dwalton76]# echo $? 1 root@cel-redxp-10[frr-dwalton76] --- diff --git a/lib/ferr.h b/lib/ferr.h index a570637372..c4f83f1710 100644 --- a/lib/ferr.h +++ b/lib/ferr.h @@ -162,7 +162,7 @@ void vty_print_error(struct vty *vty, ferr_r err, const char *msg, ...); } while (0) #define CMD_FERR_RETURN(func, ...) \ - CMD_FERR_DO(func, return CMD_WARNING, __VA_ARGS__) + CMD_FERR_DO(func, return CMD_WARNING_CONFIG_FAILED, __VA_ARGS__) #define CMD_FERR_GOTO(func, label, ...) \ CMD_FERR_DO(func, goto label, __VA_ARGS__)