[syslinux:master] lua: add the IMAGE_TYPE table to the syslinux module

syslinux-bot for Ferenc Wágner wferi at niif.hu
Sat Feb 14 11:09:08 PST 2015


Commit-ID:  c141c539e233095176300db0ead76531c14a7e47
Gitweb:     http://www.syslinux.org/commit/c141c539e233095176300db0ead76531c14a7e47
Author:     Ferenc Wágner <wferi at niif.hu>
AuthorDate: Thu, 3 Jul 2014 15:38:21 +0200
Committer:  Ferenc Wágner <wferi at niif.hu>
CommitDate: Sat, 11 Oct 2014 21:56:01 +0200

lua: add the IMAGE_TYPE table to the syslinux module

Signed-off-by: Ferenc Wágner <wferi at niif.hu>

---
 com32/lua/src/syslinux.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/com32/lua/src/syslinux.c b/com32/lua/src/syslinux.c
index 5e57db0..f17faf3 100644
--- a/com32/lua/src/syslinux.c
+++ b/com32/lua/src/syslinux.c
@@ -521,5 +521,18 @@ LUALIB_API int luaopen_syslinux(lua_State * L)
     export_key (DELETE);
     lua_setfield (L, -2, "KEY");
 
+    lua_newtable (L);
+#define export_image_type(x) lua_pushinteger (L, IMAGE_TYPE_##x); lua_setfield (L, -2, #x);
+    export_image_type (KERNEL);
+    export_image_type (LINUX);
+    export_image_type (BOOT);
+    export_image_type (BSS);
+    export_image_type (PXE);
+    export_image_type (FDIMAGE);
+    export_image_type (COM32);
+    export_image_type (CONFIG);
+    export_image_type (LOCALBOOT);
+    lua_setfield (L, -2, "IMAGE_TYPE");
+
     return 1;
 }


More information about the Syslinux-commits mailing list