2 * libuci - Library for the Unified Configuration Interface
3 * Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org>
5 * this program is free software; you can redistribute it and/or modify
6 * it under the terms of the gnu lesser general public license version 2.1
7 * as published by the free software foundation
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
33 struct uci_parse_context;
37 struct uci_config *root;
39 /* for error handling only */
40 struct uci_parse_context *pctx;
47 struct uci_parse_context
60 * uci_alloc: Allocate a new uci context
62 extern struct uci_context *uci_alloc(void);
65 * uci_perror: Print the last uci error that occured
67 * @str: string to print before the error message
69 extern void uci_perror(struct uci_context *ctx, const char *str);
72 * uci_parse: Parse an uci config file and store it in the uci context
75 * @name: name of the config file (relative to the config directory)
77 int uci_parse(struct uci_context *ctx, const char *name);
80 * uci_cleanup: Clean up after an error
84 int uci_cleanup(struct uci_context *ctx);