From 23fa73926e0871e49b15bcf9c2a87a76bc8da087 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 3 Jun 2008 22:23:10 +0200 Subject: [PATCH] load the saved history by default to make things easier for the lua binding --- cli.c | 4 ---- libuci.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/cli.c b/cli.c index 229352f..02a34c0 100644 --- a/cli.c +++ b/cli.c @@ -135,11 +135,7 @@ static int package_cmd(int cmd, char *package) struct uci_package *p = NULL; int ret; - if (cmd == CMD_CHANGES) - ctx->flags |= UCI_FLAG_SAVED_HISTORY; ret = uci_load(ctx, package, &p); - if (cmd == CMD_CHANGES) - ctx->flags &= ~UCI_FLAG_SAVED_HISTORY; if (ret != UCI_OK) { cli_perror(); diff --git a/libuci.c b/libuci.c index 5b5db54..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; -- 2.11.0