netifd: propagate error code on netifd_reload() The context is that we generate some of the UCI config for netifd via scripts/programs. Every once in a while, there's a goof when doing that UCI generation, and netifd prints out the error at stderr, but returns 0 (success) err-code. This change will fail the ubus call if UCI config is invalid or missing for /etc/config/network. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com> Acked-by: Hans Dedecker <dedeckeh@gmail.com>
main: remove redundant error check in netifd_start_process Detected by Coverity CID 1329378 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
netifd: process reload calls immediately instead of going through a timer Signed-off-by: Felix Fietkau <nbd@openwrt.org>
uci: Allow setting the UCI config path on the command line Add a -c switch which allows setting an alternative UCI path instead of using the libuci default. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
proto-shell: defer init until after command line option processing Signed-off-by: Felix Fietkau <nbd@openwrt.org>
wireless: defer init until after command line option processing Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Work around warn_unused_result in recent gcc/libc
netifd: fix process stdin/stdout/stderr when the pipe fds overlap with standard fds Signed-off-by: Felix Fietkau <nbd@openwrt.org>
utils: add a function for checking if a process given by pid is still alive Signed-off-by: Felix Fietkau <nbd@openwrt.org>
log: fix processing of incomplete lines Signed-off-by: Felix Fietkau <nbd@openwrt.org>
fix container_of for the log ustream Signed-off-by: Felix Fietkau <nbd@openwrt.org>
move uloop_process_delete call to get rid of an unnecessary check Signed-off-by: Felix Fietkau <nbd@openwrt.org>
log: the ustream notify_state callback is now optional, remove the stub Signed-off-by: Felix Fietkau <nbd@openwrt.org>
use ustream for process message logging
use FD_CLOEXEC instead of tracking lists of fds
fix a file descriptor leak
add copyright headers
simplify log buffer handling
fix log buffer splitting
fix log buffer overflow handling