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();
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;