- if ((uci_list_configs(ctx, &configs) != UCI_OK) || !configs) {
- uci_perror(ctx, appname);
- return 1;
- }
-
- 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, true);
- uci_unload(ctx, package);
- }
- }
- return 0;
-}