X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=libuci.c;h=0dd81fe3ba0f19bd2c28757ddb9aa2a95e398668;hb=52d873161248b1160596ee8ca91b2e6fd315fc18;hp=c0b4ab01571a18f2b4ed86d1bfeb38034e410e5e;hpb=f0be94e4d8d2a0c8ab35b932e88170cc37cca4af;p=project%2Fuci.git diff --git a/libuci.c b/libuci.c index c0b4ab0..0dd81fe 100644 --- a/libuci.c +++ b/libuci.c @@ -25,13 +25,14 @@ #include "err.h" static const char *uci_errstr[] = { - [UCI_OK] = "Success", - [UCI_ERR_MEM] = "Out of memory", - [UCI_ERR_INVAL] = "Invalid argument", - [UCI_ERR_NOTFOUND] = "Entry not found", - [UCI_ERR_IO] = "I/O error", - [UCI_ERR_PARSE] = "Parse error", - [UCI_ERR_UNKNOWN] = "Unknown error", + [UCI_OK] = "Success", + [UCI_ERR_MEM] = "Out of memory", + [UCI_ERR_INVAL] = "Invalid argument", + [UCI_ERR_NOTFOUND] = "Entry not found", + [UCI_ERR_IO] = "I/O error", + [UCI_ERR_PARSE] = "Parse error", + [UCI_ERR_DUPLICATE] = "Duplicate entry", + [UCI_ERR_UNKNOWN] = "Unknown error", }; #include "util.c" @@ -46,6 +47,7 @@ struct uci_context *uci_alloc_context(void) ctx = (struct uci_context *) malloc(sizeof(struct uci_context)); memset(ctx, 0, sizeof(struct uci_context)); uci_list_init(&ctx->root); + ctx->flags = UCI_FLAG_STRICT; return ctx; }