Displaying 4 results from an estimated 4 matches for "lua_pushfstring".
2018 Jan 22
2
[PATCH] lua, perl: Use thread-safe strerror_r instead of strerror (RHBZ#1536763).
...6,6 +230,7 @@ error__tostring (lua_State *L)
{
int code;
const char *msg;
+ char err[128];
lua_pushliteral (L, \"code\");
lua_gettable (L, 1);
@@ -234,8 +239,10 @@ error__tostring (lua_State *L)
lua_gettable (L, 1);
msg = luaL_checkstring (L, -1);
- if (code)
- lua_pushfstring (L, \"%%s: %%s\", msg, strerror (code));
+ if (code) {
+ ignore_value (strerror_r (code, err, sizeof err));
+ lua_pushfstring (L, \"%%s: %%s\", msg, err);
+ }
else
lua_pushstring (L, msg);
@@ -640,11 +647,12 @@ get_string_list (lua_State *L, int index)
const...
2013 Oct 03
0
Automatic boot menu?
...o = err;
+ return -1;
+ }
+ close (fd);
+ return 0;
+}
+
+/*
+** This function changes the working (current) directory
+*/
+static int change_dir (lua_State *L) {
+ const char *path = luaL_checkstring(L, 1);
+ if (chdir(path)) {
+ lua_pushnil (L);
+ lua_pushfstring (L,"Unable to change working directory to '%s'\n%s\n",
+ path, chdir_error);
+ return 2;
+ } else {
+ lua_pushboolean (L, 1);
+ return 1;
+ }
+}
+
+
+/*
+** This function returns the current...
2013 Aug 30
2
Automatic boot menu?
"H. Peter Anvin" <hpa at zytor.com> writes:
> On 08/29/2013 04:14 AM, Ferenc Wagner wrote:
>
>> "H. Peter Anvin" <hpa at zytor.com> writes:
>>
>>> On 08/22/2013 10:20 AM, Ferenc Wagner wrote:
>>>
>>>> Now that Syslinux has ls.c32 and lua.c32, it should be possible to build
>>>> a customizable boot menu in
2013 Oct 15
23
[PATCH 00/21] Upgrade to Lua 5.2.2, add filesystem module and get_key binding
Hi,
This series targets automatic boot menu generation, but most of it
is the Lua upgrade, because I got tired reading deprecated API docs.
It's mostly a straightforward forward port of the earlier Syslinux
specific changes to Lua 5.1, except that:
* I chose the add a stub getenv() implementation to the COM32 API
instead of #ifdefing out all the references in Lua, and
* I kept oslib