Reintegrate LUA script engine

26 views
Skip to first unread message

Bean

unread,
Nov 23, 2009, 3:16:58 AM11/23/09
to burg-...@googlegroups.com
Hi,

The LUA script engine is now back to the main trunk, I also fix a
small bug which cause it to fail in 64-bit platform.

--
Bean

Project: https://launchpad.net/burg
Document: https://help.ubuntu.com/community/Burg
Mailing list: http://groups.google.com/group/burg-devel

Bean

unread,
Nov 23, 2009, 4:26:27 AM11/23/09
to burg-...@googlegroups.com
Hi,

loadfile needs to use c function such as fopen, which doesn't exist in
grub, so I disable it previously. I have written a proper wrapper for
the fs calls so that loadfile works all right now. For example:

grub.cfg:
. /test1.lua

test1.lua
#!lua

func = loadfile("/test2.lua")
print("AAA")
print("BBB")
pcall(func)

test2.lua
#!lua
print("CCC")

Result:
AAA
BBB
CCC

Reply all
Reply to author
Forward
0 new messages