svn commit: r329650 - head/stand/liblua
Kyle Evans
kevans at FreeBSD.org
Tue Feb 20 18:24:21 UTC 2018
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;
}
More information about the svn-src-all
mailing list