]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/l4re-core/ned/server/src/lua_info.cc
Update
[l4.git] / l4 / pkg / l4re-core / ned / server / src / lua_info.cc
similarity index 79%
rename from l4/pkg/ned/server/src/lua_info.cc
rename to l4/pkg/l4re-core/ned/server/src/lua_info.cc
index c514e3f50823335e817f1599149c5f73e4058059..6d58a9078c43fddf4a6ea710fccae121450cf5c8 100644 (file)
@@ -9,6 +9,7 @@
 #include <l4/re/env>
 #include <l4/sys/kip.h>
 #include <l4/util/kip.h>
+#include <l4/bid_config.h>
 
 #include <lua.h>
 #include <lauxlib.h>
@@ -33,20 +34,7 @@ public:
 
   static int archstr(lua_State *l)
   {
-#if defined(ARCH_x86)
-    const char *s = "x86";
-#elif defined(ARCH_amd64)
-    const char *s = "amd64";
-#elif defined(ARCH_arm)
-    const char *s = "arm";
-#elif defined(ARCH_ppc32)
-    const char *s = "ppc32";
-#elif defined(ARCH_sparc)
-    const char *s = "sparc";
-#else
-#error Add your arch-string!
-#endif
-    lua_pushstring(l, s);
+    lua_pushstring(l, CONFIG_BUILD_ARCH);
     return 1;
   }
 
@@ -61,7 +49,7 @@ public:
 
   void init(lua_State *l)
   {
-    luaL_register(l, package, empty_reg);
+    lua_require_module(l, package);
     // L4.Info
     lua_newtable(l);