summaryrefslogtreecommitdiffhomepage
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/config.c b/config.c
index a7112f0..21791af 100644
--- a/config.c
+++ b/config.c
@@ -412,16 +412,23 @@ int
config_init_all(void)
{
int ret = 0;
+ char *err;
uci_network = config_init_package("network");
if (!uci_network) {
- fprintf(stderr, "Failed to load network config\n");
+ uci_get_errorstr(uci_ctx, &err, NULL);
+ netifd_log_message(L_CRIT, "Failed to load network config (%s)\n", err);
+ free(err);
return -1;
}
uci_wireless = config_init_package("wireless");
- if (!uci_wireless)
+ if (!uci_wireless && uci_ctx->err != UCI_ERR_NOTFOUND) {
+ uci_get_errorstr(uci_ctx, &err, NULL);
+ netifd_log_message(L_CRIT, "Failed to load wireless config (%s)\n", err);
+ free(err);
ret = -1;
+ }
vlist_update(&interfaces);
config_init = true;