When using the lua binding for UCI, there's cases where failures aren't properly propagating to the lua caller environment.
eg: (Starting from an empty file) root@blah:/# lua Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio (double int32) > uci = require("uci") > x = uci.cursor() > =x:set("unknown", "unused", "someoption", "somevalue") true << lies! > =x:save("unknown") true << more lies! > =x:commit("unknown") true << redundant lies! > root@blah:/# uci show unknown root@blah:/# ^^ hah! In this particular case, the problem is that "err = UCI_ERR_INVAL" should be "ctx->err = UCI_ERR_INVAL" however this turns out to be a prevalent problem across the lua binding. http://git.openwrt.org/?p=project/uci.git;a=blob;f=lua/uci.c;h=47d59c883ab9320b39304fdd46297576c3550fa1;hb=HEAD#l613 Options are some global replacing, or overhauling how the general utility functions handle codes like this. "Filed" as an email, as this is too big to fix in a few minutes on IRC Cheers, Karl P
signature.asc
Description: OpenPGP Digital Signature
_______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev