summaryrefslogtreecommitdiff
path: root/sys/boot/forth/loader.4th
diff options
context:
space:
mode:
authorDaniel C. Sobral <dcs@FreeBSD.org>1999-11-24 17:56:40 +0000
committerDaniel C. Sobral <dcs@FreeBSD.org>1999-11-24 17:56:40 +0000
commitd2290dd57eedb6bfaeecf9dff9e2f6e98d38b249 (patch)
tree033c5137cd090d7740ead2ddfe828790a19fc9c3 /sys/boot/forth/loader.4th
parent725585340b4a5d108d3db3961b1d556ca457380c (diff)
Notes
Diffstat (limited to 'sys/boot/forth/loader.4th')
-rw-r--r--sys/boot/forth/loader.4th24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/boot/forth/loader.4th b/sys/boot/forth/loader.4th
index 9f40cb2053c1..132633af6e45 100644
--- a/sys/boot/forth/loader.4th
+++ b/sys/boot/forth/loader.4th
@@ -38,6 +38,30 @@ only forth definitions also support-functions
0 autoboot
;
+\ ***** check-password
+\
+\ If a password was defined, execute autoboot and ask for
+\ password if autoboot returns.
+
+: check-password
+ password .addr @ if
+ 0 autoboot
+ false >r
+ begin
+ bell emit bell emit
+ ." Password: "
+ password .len @ read-password
+ dup password .len @ = if
+ 2dup password .addr @ password .len @
+ compare 0= if r> drop true >r then
+ then
+ drop free drop
+ r@
+ until
+ r> drop
+ then
+;
+
\ ***** start
\
\ Initializes support.4th global variables, sets loader_conf_files,