- if (!configs)
- return 0;
-
- for (p = configs; *p; p++) {
- if ((argc < 2) || !strcmp(argv[1], *p)) {
- struct uci_package *package = NULL;
- int ret;
-
- ret = uci_load(ctx, *p, &package);
- if (ret)
- continue;
- uci_export(ctx, stdout, package);
- uci_unload(ctx, *p);
- }
- }
- return 0;
-}
-
-static void parse_tuple(char *str, char **package, char **section, char **option, char **value)
-{
- char *last = NULL;
-
- *package = strtok(str, ".");
- if (!*package)
- goto done;
-
- last = *package;
- *section = strtok(NULL, ".");
- if (!*section)
- goto done;