netifd: propagate error code on netifd_reload()
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 27 Mar 2017 06:35:04 +0000 (09:35 +0300)
committerHans Dedecker <dedeckeh@gmail.com>
Wed, 5 Apr 2017 15:54:59 +0000 (17:54 +0200)
commit5fbd904e5b4ed87243c09c86adcfb17ae93aa4f5
tree4e02b6ffb833d34a749c989907b4d95fb35acd45
parent6e0acecbacdb5bf1ce0b71d4c2512eae4606be57
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>
config.c
config.h
main.c
netifd.h
ubus.c