]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
cache opening: add strerror into the lua exception
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 8 Jan 2020 14:52:09 +0000 (15:52 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 8 Jan 2020 15:16:52 +0000 (16:16 +0100)
Here I'm interested in "No space left on device"

daemon/bindings/cache.c

index 9733e59a5fd584f1f1ef939833775c183c4a424c..534c92ce275c7f861de0192e17c51d4729761d8f 100644 (file)
@@ -208,7 +208,8 @@ static int cache_open(lua_State *L)
        if (ret != 0) {
                char cwd[PATH_MAX];
                get_workdir(cwd, sizeof(cwd));
-               return luaL_error(L, "can't open cache path '%s'; working directory '%s'", opts.path, cwd);
+               return luaL_error(L, "can't open cache path '%s'; working directory '%s'; %s",
+                                 opts.path, cwd, kr_strerror(ret));
        }
 
        /* Store current configuration */