diff options
author | Hung-chi Lihn <hlihn@google.com> | 2012-09-22 18:25:49 +0200 |
---|---|---|
committer | Erwan Velu <erwanaliasr1@gmail.com> | 2012-09-22 18:25:49 +0200 |
commit | ecd6e3b53d17b7fa9cdb0a4d674754238ab1855a (patch) | |
tree | 5ed531ff08e5ccab96fb70f110f4848aa48b3307 /com32/lua/src/cpu.c | |
parent | 7fe364e88be0a2b8140b71a7b0583ed887f48fff (diff) | |
download | syslinux-ecd6e3b53d17b7fa9cdb0a4d674754238ab1855a.tar.gz |
In the current Lua.c32 DMI implementation, it is a flat table with dotted names in table entries. It also misses a number DMI sub-tables.
This patch, cleans up the DMI table structure using Lua's nested table structure and adds all missing DMI sub-tables. If a DMI sub-table is not supported by the hardware (not filled), then the corresponding sub-table will not be generated. This helps to make the table structure cleaner and reflects the actual DMI information.
Signed-off-by: Hung-chi Lihn <hlihn@google.com>
Signed-off-by: Erwan Velu <erwanaliasr1@gmail.com>
Diffstat (limited to 'com32/lua/src/cpu.c')
-rw-r--r-- | com32/lua/src/cpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/com32/lua/src/cpu.c b/com32/lua/src/cpu.c index 8a246e3d..6ef4e5a3 100644 --- a/com32/lua/src/cpu.c +++ b/com32/lua/src/cpu.c @@ -9,13 +9,13 @@ #include"lualib.h" #include"cpuid.h" -static void add_string_item(lua_State *L, const char *item, const char *value_str) { +void add_string_item(lua_State *L, const char *item, const char *value_str) { lua_pushstring(L,item); lua_pushstring(L,value_str); lua_settable(L,-3); } -static void add_int_item(lua_State *L, const char *item, int value_int) { +void add_int_item(lua_State *L, const char *item, int value_int) { lua_pushstring(L,item); lua_pushnumber(L,value_int); lua_settable(L,-3); |