Hi Pablo, On Tue, Oct 24, 2017 at 05:48:00PM +0200, Pablo Neira Ayuso wrote: > On Mon, Oct 23, 2017 at 05:33:16PM +0200, Phil Sutter wrote: [...] > > +/** > > + * Exit codes returned by nft_run_cmd_from_*() > > + */ > > +enum nftables_exit_codes { > > + NFT_EXIT_SUCCESS = 0, > > + NFT_EXIT_FAILURE = 1, > > + NFT_EXIT_NOMEM = 2, > > + NFT_EXIT_NONL = 3, > > +}; > > I think library is currently aborting in case of no-netlink and > no-memory, so these two error codes are not useful. > > We would need to change codebase to propagate errors up to the > callers. Ah yes, indeed. I guess for a library, calling exit() is a no-go. :) > Regarding error code, I would go for -1 in case of error instead and 0 > in case of success. If failure happens, then set errno with reason, so > we can get rid of these exit codes in a follow up patch? Sounds good, I'll send a follow-up. Thanks, Phil -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html