X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=libuci.c;h=5872ae4220a8fff2810a68aa7e83b9a97a329396;hp=59e2ea96c42fd4dcf1fabe3b2b5df2e35f6b4390;hb=8a06b55c63b13123ffcec33aff7f1fd752786dd1;hpb=7cefa00eadb4292d2c915a38a86e588c6e539d26 diff --git a/libuci.c b/libuci.c index 59e2ea9..5872ae4 100644 --- a/libuci.c +++ b/libuci.c @@ -56,7 +56,7 @@ struct uci_context *uci_alloc_context(void) uci_list_init(&ctx->root); uci_list_init(&ctx->history_path); uci_list_init(&ctx->backends); - ctx->flags = UCI_FLAG_STRICT; + ctx->flags = UCI_FLAG_STRICT | UCI_FLAG_SAVED_HISTORY; ctx->confdir = (char *) uci_confdir; ctx->savedir = (char *) uci_savedir; @@ -137,7 +137,7 @@ void uci_perror(struct uci_context *ctx, const char *prefix) if (!ctx) err = UCI_ERR_INVAL; else - err = ctx->errno; + err = ctx->err; if ((err < 0) || (err >= UCI_ERR_LAST)) err = UCI_ERR_UNKNOWN;