[LiSA-Devel] CLI_EX_* significance/usage

Andreea-Cristina Hodea andreea.cristina.hodea at gmail.com
Tue Mar 12 10:16:16 EET 2013


Hi,

I've fixed the following in cli/command/config_if.c:
-      if_change_addr(cmd, if_addr->ifindex, if_addr->inet,
if_addr->prefixlen, 0, NULL);
-      // FIXME check return value of if_change_addr()
+      if (if_change_addr(cmd, if_addr->ifindex, if_addr->inet,
if_addr->prefixlen, 0, NULL) < 0) {
+        ret = CLI_EX_REJECTED;
+        goto out_cleanup;
+      }

but I'm not quite sure when a handler should return CLI_EX_REJECTED
versus CLI_EX_WARNING. If we are here, when/where would CLI_EX_NOTIMPL
aplly?

Also, if removing one of the addresses fails, should the handler
continue to try removing the other addresses and just set ret
correspondingly?

Thanks,
Andreea


More information about the LiSA-Devel mailing list