commit | d33273dea4c2be1596da83c8450b32b946fcf3da | [log] [tgz] |
---|---|---|
author | Radek Krejci <rkrejci@cesnet.cz> | Thu Oct 25 14:55:52 2018 +0200 |
committer | Radek Krejci <rkrejci@cesnet.cz> | Thu Oct 25 14:55:52 2018 +0200 |
tree | 4011469684a47ad5b1aba03c679e319c94406682 | |
parent | 9f5e6fb94648571831779d73272e0a19268eafb5 [diff] [blame] |
YANG parser CHANGE support for including submodules
diff --git a/src/log.c b/src/log.c index 57da747..b576437 100644 --- a/src/log.c +++ b/src/log.c
@@ -34,6 +34,19 @@ /* how many bytes add when enlarging buffers */ #define LY_BUF_STEP 128 +API LY_ERR +ly_errcode(const struct ly_ctx *ctx) +{ + struct ly_err_item *i; + + i = ly_err_first(ctx); + if (i) { + return i->prev->no; + } + + return LY_SUCCESS; +} + API LY_VECODE ly_vecode(const struct ly_ctx *ctx) {