#
604919c4 |
| 24-Sep-2024 |
Warner Losh <imp@FreeBSD.org> |
loader: Fix 0 vs 1 confusion for column numbers
In two places we use '0' for a column number. However, the upper left hand corner of the screen is 1, 1. Fix those two confusions. Also, fix a comment
loader: Fix 0 vs 1 confusion for column numbers
In two places we use '0' for a column number. However, the upper left hand corner of the screen is 1, 1. Fix those two confusions. Also, fix a comment that flipped the coordinates in a comment (I'm used to the vt100 convention where it's row, column (eg y, x)) and didn't notice the rest of the code uses x, y.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D46777
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
9636a145 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line lua tag
Remove /^--\n--\s*\$FreeBSD\$.*$\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0 |
|
#
a6cf4be0 |
| 21-Oct-2019 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: don't botch disabling of color
When colors are disabled, color.escape{fg,bg} would return the passed in color rather than the proper ANSI sequence for the color. color.escape{fg,bg} would
lualoader: don't botch disabling of color
When colors are disabled, color.escape{fg,bg} would return the passed in color rather than the proper ANSI sequence for the color. color.escape{fg,bg} would be wrong.
Instead return '', as the associated reset* functions will also return ''. This should get rid of the funky '2' and '4' in the kernel selector if you're booting serial.
Reported by: npn
show more ...
|
Revision tags: release/11.3.0, release/12.0.0 |
|
#
7847e041 |
| 24-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338026 through r338297, and resolve conflicts.
|
#
116c5314 |
| 20-Aug-2018 |
Warner Losh <imp@FreeBSD.org> |
Serial console menus for lua.
Remove a bunch of special cases for UEFI and serial consoles. We do want to do curses and menu things here. This makes us match what we do in FORTH, with the possible
Serial console menus for lua.
Remove a bunch of special cases for UEFI and serial consoles. We do want to do curses and menu things here. This makes us match what we do in FORTH, with the possible exception of boxes around menus.
Differential Revision: https://reviews.freebsd.org/D16816
show more ...
|
Revision tags: release/11.2.0 |
|
#
8ce1744f |
| 21-Mar-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Clear up some possible naming confusion
In the original lualoader project, 'escapef' and 'escapeb' were chosen for 'escape fg' and 'escape bg'. We've carried on this naming convention, an
lualoader: Clear up some possible naming confusion
In the original lualoader project, 'escapef' and 'escapeb' were chosen for 'escape fg' and 'escape bg'. We've carried on this naming convention, and as our use of attributes grow the likeliness of 'escapeb'/'resetb' being confused upon glance for 'escape bold'/'reset bold' increases.
Fix this by renaming these four functions to {escape,reset}{fg,bg} rather than {escape,reset}{f,b} for clarity.
Reported by: dteske
show more ...
|
#
223e9874 |
| 02-Mar-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Use global printc instead of loader.printc
r330282 registered loader.printc as printc, so use it instead. This makes sense for a couple reasons, the major point being that it reads a litt
lualoader: Use global printc instead of loader.printc
r330282 registered loader.printc as printc, so use it instead. This makes sense for a couple reasons, the major point being that it reads a little bit easier and pairs nicely with the global 'print'.
Similar cases can not really be made for other loader.* functions as most of them are either highly specific to our use-case or usually available in other modules, such as `os`. printc does not have a standard implementation in the Lua world(*), so we have a little more leeway with it, and it's kind of a special case of the globally available 'print'.
(*) I've been in the Lua world for all of two weeks, so this could be wrong.
show more ...
|
#
ed1d0954 |
| 28-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Further screen cleanup
- Add screen.default_x and screen.default_y to determine where screen.defcursor resets the cursor to. - Use screen.setcursor in screen.defcursor instead of rewrit
lualoader: Further screen cleanup
- Add screen.default_x and screen.default_y to determine where screen.defcursor resets the cursor to. - Use screen.setcursor in screen.defcursor instead of rewriting the escape sequence. - Use screen.default_y when resetting the cursor after writing the new twiddle character, add a comment verbally describing the position just in case.
show more ...
|
#
0901ba3a |
| 28-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Re-do twiddle
It worked on my test setup, but is clearly non-functional on others.
Further examination of check-password.4th showed that it actually reset the cursor to 0,25 every time a
lualoader: Re-do twiddle
It worked on my test setup, but is clearly non-functional on others.
Further examination of check-password.4th showed that it actually reset the cursor to 0,25 every time and overwrote the previous password prompt. Do that, and also clear the "Incorrect Password" text if the correct password gets entered.
show more ...
|
#
2bb86aef |
| 27-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Convert instances of KEYSTR_ESCAPE .. "[" -> KEYSTR_CSI
|
#
d5b2439e |
| 27-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Replace instances of \027 with KEYSTR_ESCAPE
With exception to drawing bits, which should probably be kept as-is to not make a mess out of things.
Reported by: rpokala (a while ago)
|
#
a6f1506f |
| 27-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Add a twiddle at password prompt
This gives some form of feedback while typing, and matches-(ish*) Forth behavior. The cursor generally rests two column after the password prompt, then th
lualoader: Add a twiddle at password prompt
This gives some form of feedback while typing, and matches-(ish*) Forth behavior. The cursor generally rests two column after the password prompt, then the twiddle is drawn three columns later and the cursor reset to resting position after being drawn.
I've removed the note about re-evaluating it for security considerations and instead set it up as a module-local variable that we can set later depending on environment or something. It's set to false with no chance of changing at the moment.
*As close as I can tell from reading check-password.4th, because I don't have an easy test (or deployed) setup for forth loader to check how close it is. Please do mention if it's not close enough.
show more ...
|
#
5495d73c |
| 26-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: screen argument fixes
screen was also guilty of not-so-great argument names, but it was also guilty of handling color sequences on its own. Change those bits to using the color module ins
lualoader: screen argument fixes
screen was also guilty of not-so-great argument names, but it was also guilty of handling color sequences on its own. Change those bits to using the color module instead.
As a side note, between color and screen, I'm not 100% sure that returning the color_value is the right thing to do if we won't generate the escape sequences. This should be re-evaluated at a later time, and they should likely return nil instead.
show more ...
|
#
72e39d71 |
| 23-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
Add SPDX tags to lua files
|
#
1ea29954 |
| 21-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Remove nasty hack for not printing out ".0"
luaconf.h has a LUA_COMPAT_FLOATSTRING option that may be defined to do this instead of needing intstring.
Reported by: Dan Nelson
|
#
9f71d421 |
| 21-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Drop excessive parenthesizing
This was also a convenience convention (for me) that is not very lua-tic. Drop it.
I've maintained some parentheses where I'd prefer them, for example, 'if
lualoader: Drop excessive parenthesizing
This was also a convenience convention (for me) that is not very lua-tic. Drop it.
I've maintained some parentheses where I'd prefer them, for example, 'if x or y or (z and w) then', but these situations are far and few between.
show more ...
|
#
aedd6be5 |
| 21-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Drop terminating semicolons
This was previously chosen out of convenience, as we had a mixed style and needed to be consistent. I started learning Lua on Friday, so I switched everything
lualoader: Drop terminating semicolons
This was previously chosen out of convenience, as we had a mixed style and needed to be consistent. I started learning Lua on Friday, so I switched everything over. It is not a very lua-nic convention, though, so drop it.
Excessive parenthesizing around conditionals is next on the chopping block.
show more ...
|
#
b5746545 |
| 20-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
stand/lua: Consistently organize modules
We follow pretty closely the following structure of a module:
1. Copyright notice 2. Module requires 3. Module local declarations 4. Module local definition
stand/lua: Consistently organize modules
We follow pretty closely the following structure of a module:
1. Copyright notice 2. Module requires 3. Module local declarations 4. Module local definitions 5. Module exports 6. return
Re-organize the one-offs (config/drawer) and denote the start of module exports with a comment.
show more ...
|
#
e15abd1f |
| 20-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
stand/lua: Consistently declare local functions at module scope
Declare these adjacent to the local definitions at the top of the module, and make sure they're actually declared local to pollute glo
stand/lua: Consistently declare local functions at module scope
Declare these adjacent to the local definitions at the top of the module, and make sure they're actually declared local to pollute global namespace a little bit less.
show more ...
|
#
1f5696c7 |
| 19-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
stand/lua: Round up some more style.lua(9) concerns
|
#
b140d14b |
| 19-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
stand/lua: Rename bootserial for clarity
|
#
24a1bd54 |
| 17-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
stand/lua: Style pass
These are the style points that I'd like to try and maintain in our lua scripts: - Parentheses around conditionals - Trailing semicolons, except on block terminators - s:method
stand/lua: Style pass
These are the style points that I'd like to try and maintain in our lua scripts: - Parentheses around conditionals - Trailing semicolons, except on block terminators - s:method(...) instead of string.method(s, ...) where applicable
There's likely more, but that'll get hammered out as we continue.
show more ...
|
#
5f9d54f4 |
| 16-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
stand/lua: Use escaped dot instead of single character class
|
#
901d96e3 |
| 16-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
stand/lua: Chop off the decimal for numbers passed to setcursor
Decimals screw up the escape sequence and the cursor will not get set. Right now this only affects setting the cursor for drawing "Wel
stand/lua: Chop off the decimal for numbers passed to setcursor
Decimals screw up the escape sequence and the cursor will not get set. Right now this only affects setting the cursor for drawing "Welcome to FreeBSD" -- the resulting number after our (x+(w/2)-9) calculation gets output as "14.0."
This should be fixed at the interpreter level, rather than here, but this is not a widespread problem at the moment so we'll fix it up in further work.
Reported by: David Wolfskill <david@catwhisker.org> Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D14375
show more ...
|