X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=libuci.c;h=cb0bc360ab442ee1b0cc4617c6b3674d945df212;hp=262ca698c5f68753ecd68a4e6a156e1e50e295ec;hb=a1ce94eed364952e8998def4e964ecb6b33b977d;hpb=25424d34314f5da11305104c78cc82beff801e16 diff --git a/libuci.c b/libuci.c index 262ca69..cb0bc36 100644 --- a/libuci.c +++ b/libuci.c @@ -116,7 +116,7 @@ void uci_perror(struct uci_context *ctx, const char *str) switch (err) { case UCI_ERR_PARSE: if (ctx->pctx) { - fprintf(stderr, "%s: %s at line %d, byte %d\n", str, uci_errstr[err], ctx->pctx->line, ctx->pctx->byte); + fprintf(stderr, "%s: %s (%s) at line %d, byte %d\n", str, uci_errstr[err], (ctx->pctx->reason ? ctx->pctx->reason : "unknown"), ctx->pctx->line, ctx->pctx->byte); break; } /* fall through */