# cat /etc/config/programmino config camera A option zoom 14 config camera B option zoom 2 #include #include int main() { struct uci_context *ctx; struct uci_package *p = NULL; struct uci_element *e = NULL; char *package = NULL; char* section = NULL; char* option = NULL; char* value = NULL; char** ptr = NULL; char* comando = "programmino.B.zoom"; ctx = uci_alloc_context(); if (!ctx) { printf("Out of memory\n"); return 1; } if(uci_parse_tuple(ctx, comando, &package, §ion, &option, ptr) != UCI_OK) return 1; //printf("%s - %s - %s", package, section, option); uci_free_context(ctx); return 0; } # colorgcc -Wall -g -o opzione -luci opzione.c opzione.c: In function 'main': opzione.c:12: warning: unused variable 'value' opzione.c:8: warning: unused variable 'e' opzione.c:7: warning: unused variable 'p' # ./opzione Segmentation fault (core dumped)