Browse Source

load the saved history by default to make things easier for the lua binding

Felix Fietkau 16 years ago
parent
commit
23fa73926e
2 changed files with 1 additions and 5 deletions
  1. 0 4
      cli.c
  2. 1 1
      libuci.c

+ 0 - 4
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();

+ 1 - 1
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;