X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=file.c;h=01205052b7ff6bc75494835154953bcea16601cb;hb=862bdfa26c2f016e2db67dc700d87ca4cf24a6e9;hp=33ba93c84e5d402d407f6dde3a19ca76462da6fc;hpb=6ce771b1095c220f849e70cdcbf23bd09f7fe7d5;p=project%2Fuci.git diff --git a/file.c b/file.c index 33ba93c..0120505 100644 --- a/file.c +++ b/file.c @@ -694,14 +694,14 @@ void uci_file_commit(struct uci_context *ctx, struct uci_package **package, bool /* open the config file for writing now, so that it is locked */ f = uci_open_stream(ctx, p->path, SEEK_SET, true, true); - /* flush unsaved changes and reload from history file */ + /* flush unsaved changes and reload from delta file */ UCI_TRAP_SAVE(ctx, done); - if (p->has_history) { + if (p->has_delta) { if (!overwrite) { name = uci_strdup(ctx, p->e.name); path = uci_strdup(ctx, p->path); - /* dump our own changes to the history file */ - if (!uci_list_empty(&p->history)) + /* dump our own changes to the delta file */ + if (!uci_list_empty(&p->delta)) UCI_INTERNAL(uci_save, ctx, p); /* @@ -713,15 +713,15 @@ void uci_file_commit(struct uci_context *ctx, struct uci_package **package, bool UCI_INTERNAL(uci_import, ctx, f, name, &p, true); p->path = path; - p->has_history = true; + p->has_delta = true; *package = p; /* freed together with the uci_package */ path = NULL; } - /* flush history */ - if (!uci_load_history(ctx, p, true)) + /* flush delta */ + if (!uci_load_delta(ctx, p, true)) goto done; } @@ -841,8 +841,8 @@ static struct uci_package *uci_file_load(struct uci_context *ctx, const char *na if (package) { package->path = filename; - package->has_history = confdir; - uci_load_history(ctx, package, false); + package->has_delta = confdir; + uci_load_delta(ctx, package, false); } done: