X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=uci.h;h=574a3849f44ea828e4fcc7021bbf5a35e8303994;hp=93f8bce9730726c14a2627cc004724e4b4dd939a;hb=72d64f1bf4ee47788fee5b3eb4149c9fb34859d3;hpb=b69b459ecce221f92235d0def138ff4af3c22543 diff --git a/uci.h b/uci.h index 93f8bce..574a384 100644 --- a/uci.h +++ b/uci.h @@ -105,6 +105,7 @@ extern void uci_perror(struct uci_context *ctx, const char *str); * @single: ignore the 'package' keyword and parse everything into a single package * * the name parameter is for config files that don't explicitly use the 'package <...>' keyword + * if 'package' points to a non-null struct pointer, enable history tracking and merge */ extern int uci_import(struct uci_context *ctx, FILE *stream, const char *name, struct uci_package **package, bool single); @@ -213,11 +214,12 @@ extern int uci_save(struct uci_context *ctx, struct uci_package *p); * uci_commit: commit changes to a package * @ctx: uci context * @p: uci_package struct pointer + * @overwrite: overwrite existing config data and flush history * * committing may reload the whole uci_package data, * the supplied pointer is updated accordingly */ -extern int uci_commit(struct uci_context *ctx, struct uci_package **p); +extern int uci_commit(struct uci_context *ctx, struct uci_package **p, bool overwrite); /** * uci_list_configs: List available uci config files @@ -276,6 +278,7 @@ struct uci_parse_context /* private: */ struct uci_package *package; struct uci_section *section; + bool merge; FILE *file; const char *name; char *buf;