X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=file.c;h=ae58fbc6ed9982c495aa84e8fa3f7260b60782dd;hp=95469c5f64e7b221621ee27b29fc2e45fb549bba;hb=333ef9e09be5ac9c191625cca4efcebdbfc22073;hpb=1085fcb801f6e716b41d4c80942c7c802b5270b3 diff --git a/file.c b/file.c index 95469c5..ae58fbc 100644 --- a/file.c +++ b/file.c @@ -523,7 +523,7 @@ static void uci_export_package(struct uci_package *p, FILE *stream, bool header) uci_foreach_element(&p->sections, s) { struct uci_section *sec = uci_to_section(s); fprintf(stream, "\nconfig '%s'", uci_escape(ctx, sec->type)); - if (!sec->anonymous) + if (!sec->anonymous || (ctx->flags & UCI_FLAG_EXPORT_NAME)) fprintf(stream, " '%s'", uci_escape(ctx, sec->e.name)); fprintf(stream, "\n"); uci_foreach_element(&sec->options, o) {