summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2018-02-28 04:31:19 +0000
committerKyle Evans <kevans@FreeBSD.org>2018-02-28 04:31:19 +0000
commited1d0954ca4abf42d76a9da282650fe5bc6956bb (patch)
treeea5ad1039a9c15661eb166633147afd12a6642eb
parent0901ba3aa149d7453e65d98ee8083237dd5db9f0 (diff)
Notes
-rw-r--r--stand/lua/password.lua3
-rw-r--r--stand/lua/screen.lua5
2 files changed, 6 insertions, 2 deletions
diff --git a/stand/lua/password.lua b/stand/lua/password.lua
index d14dec675436..c8352ea519d7 100644
--- a/stand/lua/password.lua
+++ b/stand/lua/password.lua
@@ -47,7 +47,8 @@ function password.read(prompt_length)
local function draw_twiddle()
loader.printc(" " .. twiddle_chars[twiddle_pos])
- screen.setcursor(prompt_length + 2, 25)
+ -- Reset cursor to just after the password prompt
+ screen.setcursor(prompt_length + 2, screen.default_y)
twiddle_pos = (twiddle_pos % #twiddle_chars) + 1
end
diff --git a/stand/lua/screen.lua b/stand/lua/screen.lua
index 04ab98817c32..7382e2ebbc68 100644
--- a/stand/lua/screen.lua
+++ b/stand/lua/screen.lua
@@ -34,6 +34,9 @@ local core = require("core")
local screen = {}
-- Module exports
+screen.default_x = 0
+screen.default_y = 25
+
function screen.clear()
if core.isSerialBoot() then
return
@@ -71,7 +74,7 @@ function screen.defcursor()
if core.isSerialBoot() then
return
end
- loader.printc(core.KEYSTR_CSI .. "25;0H")
+ screen.setcursor(screen.default_x, screen.default_y)
end
return screen