svn commit: r280490 - projects/lua-bootloader/sys/boot/common
Rui Paulo
rpaulo at FreeBSD.org
Wed Mar 25 06:10:42 UTC 2015
Author: rpaulo
Date: Wed Mar 25 06:10:41 2015
New Revision: 280490
URL: https://svnweb.freebsd.org/changeset/base/280490
Log:
interp_lua: improve debugging messages and style.
Modified:
projects/lua-bootloader/sys/boot/common/interp_lua.c
Modified: projects/lua-bootloader/sys/boot/common/interp_lua.c
==============================================================================
--- projects/lua-bootloader/sys/boot/common/interp_lua.c Wed Mar 25 06:08:41 2015 (r280489)
+++ projects/lua-bootloader/sys/boot/common/interp_lua.c Wed Mar 25 06:10:41 2015 (r280490)
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
#include <src/lualib.h>
#include <lutils.h>
-
struct interp_lua_softc {
lua_State *luap;
};
@@ -67,7 +66,7 @@ interp_lua_init(void *ctx)
softc = ctx;
luap = lua_create();
if (luap == NULL) {
- LDBG("problem with initializing Lua interpreter\n");
+ LDBG("problem initializing the Lua interpreter");
}
softc->luap = luap;
register_utils(luap);
@@ -88,7 +87,7 @@ interp_lua_run(void *data, const char *l
luap = softc->luap;
if (ldo_string(luap, line, strlen(line)) != 0)
- printf("[LUA]Failed to execure \'%s\'\n", line);
+ LDBG("failed to execute \'%s\'", line);
return (0);
}
@@ -104,13 +103,13 @@ interp_lua_incl(void *ctx, const char *f
}
/*
- * To avoid conflicts lua uses loader.lua instead of
- * loader.rc/boot.conf to load its configurations.
+ * To avoid conflicts, this lua interpreter uses loader.lua instead of
+ * loader.rc/boot.conf to load its configurations.
*/
int
interp_lua_load_config(void *ctx)
{
- return interp_lua_incl(ctx, "/boot/loader.lua");
+ return (interp_lua_incl(ctx, "/boot/loader.lua"));
}
More information about the svn-src-projects
mailing list