From c4b1eb35e827c43a0dcf41027c98aaedf46be036 Mon Sep 17 00:00:00 2001 From: lneto Date: Sat, 19 Jul 2014 18:38:33 +0000 Subject: 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 --- sys/modules/lua/lua.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/modules/lua/lua.c') 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 . @@ -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"); -- cgit