From: Gordon Hecker Date: Wed, 22 Apr 2009 15:07:34 +0000 (+0200) Subject: make e2util.umask() return previous umask value X-Git-Tag: e2factory-2.3.1pre1~42 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=313232b3a00240c47aacb8219d1b917acb5843d1;p=e2factory.git make e2util.umask() return previous umask value Signed-off-by: Gordon Hecker --- diff --git a/generic/e2util.c b/generic/e2util.c index fb84c32..7e1fed1 100644 --- a/generic/e2util.c +++ b/generic/e2util.c @@ -625,14 +625,17 @@ is_terminal(lua_State *lua) /* e2util.umask(VAL) Set the umask to VAL + Returns the previous value of umask */ static int set_umask(lua_State *lua) { int u = luaL_checkinteger(lua, 1); - umask(u); - return 0; + int pu = 0; + pu = umask(u); + lua_pushinteger(lua, pu); + return 1; } /* e2util.setenv(var, val, overwrite)