Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2015 06:10:42 +0000 (UTC)
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r280490 - projects/lua-bootloader/sys/boot/common
Message-ID:  <201503250610.t2P6AgEB058333@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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"));
 }
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503250610.t2P6AgEB058333>