X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=err.h;h=686cde354b5d24fc3886c27a6ca217f3e0815106;hp=82eba81320693ff95693a96aa2abfaa1f7e059f0;hb=cba72526bbd55932caf58bcb673b8fa8b1b98c89;hpb=8e57ddf6b61e9e95e1f319b1def18789f19f9ee1 diff --git a/err.h b/err.h index 82eba81..686cde3 100644 --- a/err.h +++ b/err.h @@ -41,7 +41,9 @@ * and UCI_TRAP_RESTORE. */ #define UCI_HANDLE_ERR(ctx) do { \ + DPRINTF("ENTER: %s\n", __func__); \ int __val = 0; \ + ctx->errno = 0; \ if (!ctx) \ return UCI_ERR_INVAL; \ if (!ctx->internal) \ @@ -73,6 +75,12 @@ memcpy(ctx->trap, __old_trap, sizeof(ctx->trap)); \ } while(0) +/** + * UCI_INTERNAL: Do an internal call of a public API function + * + * Sets Exception handling to passthrough mode. + * Allows API functions to change behavior compared to public use + */ #define UCI_INTERNAL(func, ctx, ...) do { \ ctx->internal = true; \ func(ctx, __VA_ARGS__); \