Commit Graph

12 Commits

Author SHA1 Message Date
Devin Teske
b98ba21ac2 + This patch does not change user experience or functionality
+ Cleanup syntax, slim-down code, and make things more readable
+ Introduce new +c! operator and ilk to reduce heap usage/allocations
+ Add safemode_enabled? safemode_enable and safemode_disable functions
+ Add singleuser_enabled? singleuser_enable singleuser_disable functions
+ Add verbose_enabled? verbose_enable and verbose_disable functions
+ Centralize strings (also to reduce heap usage)

Reviewed by:	peterj, adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-11-16 01:24:11 +00:00
Devin Teske
d61579b8e7 Fix a stack leak in [unused] cycle_menuitem function while we're here
(required misconfiguration and/or missing environment vars to occur).

Reviewed by:	peterj, adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-11-12 18:38:54 +00:00
Devin Teske
c4a25e9646 Add ontop of my existing boot loader Forth code, including support for
submenus. See menusets.4th(8) for additional details including examples.

Discussed on arch and recommended for inclusion at the devsummit.

This change does not alter the appearance or user experience, only enhances
possibilities.

Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-11-06 19:26:36 +00:00
Devin Teske
55f9ff659d Since the introduction of the new advanced boot menu (r222417), options like
"boot verbose", "single user mode", "ACPI" and more are now stateful boolean
menuitems rather than direct action-items.

A short-coming in this new menu system is that when a user sets a non-default
value in loader.conf(5), this non-default state is not reflected in the menu
-- leading to confusion as to whether the option was taking effect or not.

This patch adds dynamic menuitem constructors _and_ the necessary Forth
callbacks to initialize these stateful menuitems -- causing the aforementioned
menuitems to adhere to loader.conf(5) settings.

PR:		bin/172529
Approved by:	adrian (co-mentor)
MFC after:	21 days
2012-10-14 06:52:49 +00:00
Devin Teske
09bc77f513 Fix an oversight that cyclic menu items actually are zero-based and can
accommodate 10 different states.

Reviewed by:	eadler, adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-09 03:11:15 +00:00
Devin Teske
8d9cadfb22 Make the "Options:" separator-text configurable by setting $menu_optionstext.
Reviewed by:	eadler, adrian (co-mentor)
Approved by:	adrian (co-mentor)
MFC after:	3 days
2012-10-09 01:31:03 +00:00
Devin Teske
999916a0d4 Comment and Copyright fixes/updates.
Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-07 15:37:30 +00:00
Devin Teske
d35c4b1d44 Fix domain.
Approved by:	emaste
2012-07-14 01:45:35 +00:00
Devin Teske
4c4947ad9d Update contact info.
PR:		N/A (mentor approved)
Submitted by:	dteske
Reviewed by:	dteske (mentor approved)
Approved by:	emaste (mentor)
MFC after:	1 week
2012-05-17 20:00:34 +00:00
Sergey Kandaurov
744aebe369 Unset the environment variables associated with individual menu items
before invoking the kernel.

Quoting submitter:

The issue is with the new boot loader menu. It adds many loader variables
including ones that contain ANSI color escapes.

Obviously, these ANSI codes don't play well with serial consoles when
kenv(1) is executed without arguments (reports vary as to what happens,
but it's never pretty).

The net-effect is that kenv(1) no longer reports menu-related variables.

In essence, kenv(1) output should now appear the same as on RELENG_8
(which lacks the new boot loader and didn't use any such variables).
Thus, restoring serial console glory.

Submitted by:	Devin Teske <devin dott teske fisglobal.com>
MFC after:	2 weeks
2011-12-30 06:24:59 +00:00
Jaakko Heinonen
871ffe942d Restore behavior of the autoboot_delay="-1" boot menu setting to the
pre-r222417 state. The behavior was essentially reversed in r222417
which can cause confusion.

PR:		159775
Submitted by:	Devin Teske
Approved by:	re (kib)
2011-09-02 19:29:37 +00:00
Julian Elischer
802e09ac9e New boot loader menus from Devin Teske.
Discussed on hackers and recommended for inclusion into 9.0 at the devsummit.
All support email to devin   dteske at vicor dot ignoreme dot com .

Submitted by:	dteske at vicor dot ignoreme dot com
Reviewed by:	me and many others
2011-05-28 08:50:38 +00:00