tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Moving Lua source codes

Am 21.10.13 07:57, schrieb Artem Falcon:


> Doing w/o a diff, i don't have a sane mail environment now to send it inline.
> There's few more things.
> First: you forgot to add MODULE_CLASS_LUA_BINDING to a
> sys/sys/module.h.

FWIW, I removed the MODULE_CLASS_LUA_BINDING and use the existing
MODULE_CLASS_MISC for Lua bindings.  "require 'foo'" will look for a
kernel module with the name "luafoo" and load it, if existing.  It is
the up to "luafoo" to register whatever it has to offer.

In the unlike case that "luafoo" was something else than a Lua binding,
it would be loaded, but provide no functionality.  That is the only
side-effect I can think of right now.  So I think "require" can not be
abused to load arbitrary modules, since they must be prefixed by "lua".

Home | Main Index | Thread Index | Old Index