summaryrefslogtreecommitdiff
path: root/sys/modules/lua/lua.c
diff options
context:
space:
mode:
authorlneto <lneto@NetBSD.org>2014-07-19 18:38:33 +0000
committerlneto <lneto@NetBSD.org>2014-07-19 18:38:33 +0000
commitc4b1eb35e827c43a0dcf41027c98aaedf46be036 (patch)
treef80015954e9c51266af4f2e1c57f2134cbcc1d62 /sys/modules/lua/lua.c
parentc6d74635a1d93d95a3770bd621dcd83ed33100c2 (diff)
lua: updated from 5.1 to 5.3 work3
* lua(1): - changed lua_Integer to intmax_t - updated distrib/sets/lists and etc/mtree - updated bsd.lua.mk - fixed bozohttpd (lua-bozo.c) - compatibilized bindings: gpio, sqlite * lua(4): - removed floating-point and libc dependencies using '#ifndef _KERNEL' - fixed division by zero and exponentiation - libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct() - acpica: removed isprint() from acnetbsd.h - libc: moved strcspn.c, strpbrk.c and strspn.c to common - removed stub headers - compatibilized bindings: luapmf, luasystm * reorganized luaconf.h * updated doc/CHANGES and doc/RESPONSIBLE
Diffstat (limited to 'sys/modules/lua/lua.c')
-rw-r--r--sys/modules/lua/lua.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/modules/lua/lua.c b/sys/modules/lua/lua.c
index 6aed4cc3153..636ec326d18 100644
--- a/sys/modules/lua/lua.c
+++ b/sys/modules/lua/lua.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lua.c,v 1.11 2014/07/19 17:20:02 lneto Exp $ */
+/* $NetBSD: lua.c,v 1.12 2014/07/19 18:38:35 lneto Exp $ */
/*
* Copyright (c) 2014 by Lourival Vieira Neto <lneto@NetBSD.org>.
@@ -194,7 +194,7 @@ lua_attach(device_t parent, device_t self, void *aux)
NULL, 0, &lua_max_instr, 0,
CTL_CREATE, CTL_EOL);
- aprint_normal_dev(self, "%s %s\n", LUA_RELEASE, LUA_COPYRIGHT);
+ aprint_normal_dev(self, "%s\n", LUA_COPYRIGHT);
}
static int
@@ -424,7 +424,7 @@ luaioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
VOP_UNLOCK(nd.ni_vp);
klua_lock(s->K);
error = lua_load(s->K->L, lua_reader, &ls,
- strrchr(load->path, '/') + 1);
+ strrchr(load->path, '/') + 1, "bt");
vn_close(nd.ni_vp, FREAD, cred);
switch (error) {
case 0: /* no error */
@@ -509,7 +509,7 @@ lua_require(lua_State *L)
md->open(L);
md->refcount++;
LIST_INSERT_HEAD(&s->lua_modules, md, mod_next);
- return 0;
+ return 1;
}
lua_pushstring(L, "module not found");