Date: Tue, 20 Feb 2018 18:24:20 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329650 - head/stand/liblua Message-ID: <201802201824.w1KIOKPT084829@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802201824.w1KIOKPT084829>