[syslinux] Lua.c32 - user input / scripting

e h ehouston3 at yahoo.com
Wed May 11 06:15:43 PDT 2011


I think the issue may be in "/lua/src/liolib.c" I saw a lot of commented out 
io_read and other read related functions.  I'm guessing they weren't working 
properly. 


-EH



----- Original Message ----
From: e h <ehouston3 at yahoo.com>
To: syslinux at zytor.com
Sent: Mon, May 9, 2011 12:12:51 PM
Subject: [syslinux] Lua.c32 - user input / scripting

I'm trying to get this bit of code to work with the lua.c32 interpreter:

--- sample, the goal is to build a script that will allow me to enter a 4digit 
mt and load the bios iso accordingly

print ("enter machine type :")
mt = io.read()
print ("you entered...",mt)
doStuff()

if (mt == "8141") then
  syslinux.run_command("memdisk initrd=/dos/BIOS/FSC-P7935-108.img raw")
end

--- the problem is that lua kicks out an error every time "...attempt to call 
field 'read' ( a nil value)"
--- this seems to work on the interpreter i installed on my linux box, but when 
i use it as a com32 it fails.
--- boot: Lua.c32 /test/test.lua ---> runs lua script but fails on io.read()

any help appreciated

Thanks,

ehouston3

_______________________________________________
Syslinux mailing list
Submissions to Syslinux at zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.




More information about the Syslinux mailing list