Page MenuHomeFreeBSD

lualoader: Add ability to intercept cli commands
ClosedPublic

Authored by kevans on Feb 20 2018, 5:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 9, 7:05 PM
Unknown Object (File)
Wed, Aug 26, 4:16 PM
Unknown Object (File)
Wed, Aug 26, 12:12 PM
Unknown Object (File)
Tue, Aug 25, 5:46 PM
Unknown Object (File)
Tue, Aug 25, 5:34 PM
Unknown Object (File)
Tue, Aug 25, 3:02 PM
Unknown Object (File)
Mon, Aug 24, 7:16 PM
Unknown Object (File)
Sun, Aug 23, 8:59 PM
Subscribers
None

Details

Summary

If we failed to execute the input line as pure lua, run the command through parse for consistent argument parsing. Pass the parsed arguments through to a global "cli_execute" written in Lua, which is expected to either handle it or pass it back through to interp_builtin_cmd (via loader.command).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 15165

Event Timeline

stand/common/interp_lua.c
149

This seems to have disappeared.

Don't add leaks that weren't there before

I'm good either way, but if you keep what you have a quick comment wouldn't be terrible.

stand/lua/loader.lua
42

was thinking this would just be cmd(...) for symmetry, though I suppose it doesn't matter much since the traditional reason for passing argv[0] isn't relevant here.

This revision is now accepted and ready to land.Feb 20 2018, 5:32 PM
This revision was automatically updated to reflect the committed changes.