summaryrefslogtreecommitdiff
path: root/com32/lua/src/syslinux.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-07-05 15:45:37 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-07-05 15:45:37 -0700
commit0a984adcbd5130e790a774e0d78d66465ecc6c0a (patch)
tree469e7e367aa7b683a4b3419444aa8153e4f98ac3 /com32/lua/src/syslinux.c
parenta393bcdefd525c43fce16a9f50a03402533b55f4 (diff)
downloadsyslinux-0a984adcbd5130e790a774e0d78d66465ecc6c0a.tar.gz
com32: add proper sleep()/msleep() functions and make Lua use them
Add proper sleep() and msleep() functions, which among other things call syslinux_idle(), and make Lua use them. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/lua/src/syslinux.c')
-rw-r--r--com32/lua/src/syslinux.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/com32/lua/src/syslinux.c b/com32/lua/src/syslinux.c
index be061c4c..a272fc61 100644
--- a/com32/lua/src/syslinux.c
+++ b/com32/lua/src/syslinux.c
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <syslinux/boot.h>
#define lnetlib_c /* Define the library */
@@ -209,7 +210,7 @@ static int sl_boot_linux(lua_State * L)
/* DEBUG
printf("Command line: %s\n", newcmdline);
- sleep(1000);
+ msleep(1000);
*/
/* Look for specific command-line arguments we care about */
@@ -269,7 +270,7 @@ static int sl_boot_linux(lua_State * L)
printf("Loading extra file failed\n");
/* DEBUG
- sleep(10000);
+ msleep(10000);
*/
ret = syslinux_boot_linux(kernel_data, kernel_len, initramfs, newcmdline);
@@ -283,7 +284,7 @@ static int sl_boot_linux(lua_State * L)
static int sl_sleep(lua_State * L)
{
unsigned int msec = luaL_checkint(L, 1);
- sleep(msec);
+ msleep(msec);
return 0;
}