Author: kevans Date: Tue Feb 20 18:24:20 2018 New Revision: 329650 URL: https://svnweb.freebsd.org/changeset/base/329650
Log: liblua: Add loader.machine and loader.machine_arch properties Provisioned from MACHINE/MACHINE_ARCH on the system, expose loader.machine and loader.machine_arch respectively. These may be used to hide ACPI option on non-applicable archs. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D14446 Modified: head/stand/liblua/lutils.c Modified: head/stand/liblua/lutils.c ============================================================================== --- head/stand/liblua/lutils.c Tue Feb 20 18:21:30 2018 (r329649) +++ head/stand/liblua/lutils.c Tue Feb 20 18:24:20 2018 (r329650) @@ -28,6 +28,8 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <sys/param.h> + #include "lua.h" #include "lauxlib.h" #include "lstd.h" @@ -263,6 +265,11 @@ int luaopen_loader(lua_State *L) { luaL_newlib(L, loaderlib); + /* Add loader.machine and loader.machine_arch properties */ + lua_pushstring(L, MACHINE); + lua_setfield(L, -2, "machine"); + lua_pushstring(L, MACHINE_ARCH); + lua_setfield(L, -2, "machine_arch"); return 1; } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"