From: Felix Fietkau Date: Tue, 12 Feb 2008 11:24:36 +0000 (+0100) Subject: consistency X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4e55f6b3829420be74d35db2e55bafb18ac8ce21;p=uci.git consistency --- diff --git a/list.c b/list.c index fb4d478..376d38b 100644 --- a/list.c +++ b/list.c @@ -401,6 +401,7 @@ int uci_rename(struct uci_context *ctx, struct uci_package *p, char *section, ch int uci_add_section(struct uci_context *ctx, struct uci_package *p, char *type, struct uci_section **res) { + bool internal = ctx->internal; struct uci_section *s; UCI_HANDLE_ERR(ctx); @@ -408,7 +409,8 @@ int uci_add_section(struct uci_context *ctx, struct uci_package *p, char *type, s = uci_alloc_section(p, type, NULL); uci_fixup_section(ctx, s); *res = s; - uci_add_history(ctx, &p->history, UCI_CMD_ADD, s->e.name, NULL, type); + if (!internal && p->has_history) + uci_add_history(ctx, &p->history, UCI_CMD_ADD, s->e.name, NULL, type); return 0; }