]> pilppa.org Git - uci.git/blobdiff - uci.h
export uci_parse_ptr
[uci.git] / uci.h
diff --git a/uci.h b/uci.h
index 74bbdffa921cf8e2e8a34fcb103b0a0cd969165d..4fa0b6a44a7b74a846d48209bcdbca6d448ca98e 100644 (file)
--- a/uci.h
+++ b/uci.h
@@ -147,7 +147,9 @@ extern int uci_unload(struct uci_context *ctx, struct uci_package *p);
  * Examples:
  *   network.@interface[0].ifname ('ifname' option of the first interface section)
  *   network.@interface[-1]       (last interface section)
- * Note: uci_lookup_ext will automatically load a config package if necessary
+ * Note: uci_lookup_ptr will automatically load a config package if necessary
+ * @str must not be constant, as it will be modified and used for the strings inside @ptr,
+ * thus it must also be available as long as @ptr is in use.
  */
 extern int uci_lookup_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str, bool extended);
 
@@ -321,6 +323,15 @@ int uci_load_plugin(struct uci_context *ctx, const char *filename);
  */
 int uci_load_plugins(struct uci_context *ctx, const char *pattern);
 
+/**
+ * uci_parse_ptr: parse a uci string into a uci_ptr
+ * @ctx: uci context
+ * @ptr: target data structure
+ * @str: string to parse
+ *
+ * str is modified by this function
+ */
+int uci_parse_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str);
 
 /* UCI data structures */
 enum uci_type {