test: adjust for auto-naming anonymous sections
[project/uci.git] / uci.h
diff --git a/uci.h b/uci.h
index abba660..eea7303 100644 (file)
--- a/uci.h
+++ b/uci.h
@@ -252,6 +252,8 @@ extern int uci_list_configs(struct uci_context *ctx, char ***list);
  * uci_set_savedir: override the default delta save directory
  * @ctx: uci context
  * @dir: directory name
+ *
+ * This will also try adding the specified dir to the end of delta pathes.
  */
 extern int uci_set_savedir(struct uci_context *ctx, const char *dir);
 
@@ -269,8 +271,8 @@ extern int uci_set_confdir(struct uci_context *ctx, const char *dir);
  *
  * This function allows you to add directories, which contain 'overlays'
  * for the active config, that will never be committed.
- * Caller of this API should ensure that no duplicate entries (including the
- * default search path, e.g. `UCI_SAVEDIR') should be added.
+ *
+ * Adding a duplicate directory will cause UCI_ERR_DUPLICATE be returned.
  */
 extern int uci_add_delta_path(struct uci_context *ctx, const char *dir);
 
@@ -368,7 +370,7 @@ enum uci_option_type {
 enum uci_flags {
        UCI_FLAG_STRICT =        (1 << 0), /* strict mode for the parser */
        UCI_FLAG_PERROR =        (1 << 1), /* print parser error messages */
-       UCI_FLAG_EXPORT_NAME =   (1 << 2), /* when exporting, name unnamed sections */
+       UCI_FLAG_EXPORT_NAME =   (1 << 2), /* when exporting, name unnamed sections [unused] */
        UCI_FLAG_SAVED_DELTA = (1 << 3), /* store the saved delta in memory as well */
 };
 
@@ -433,6 +435,7 @@ struct uci_package
        struct uci_backend *backend;
        void *priv;
        int n_section;
+       int name_index;
        struct uci_list delta;
        struct uci_list saved_delta;
 };