Deleted Added
sdiff udiff text old ( 256281 ) new ( 262701 )
full compact
1\ Copyright (c) 2006-2012 Devin Teske <dteske@FreeBSD.org>
2\ All rights reserved.
3\
4\ Redistribution and use in source and binary forms, with or without
5\ modification, are permitted provided that the following conditions
6\ are met:
7\ 1. Redistributions of source code must retain the above copyright
8\ notice, this list of conditions and the following disclaimer.
9\ 2. Redistributions in binary form must reproduce the above copyright

--- 7 unchanged lines hidden (view full) ---

17\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23\ SUCH DAMAGE.
24\
25\ $FreeBSD: stable/10/sys/boot/forth/menu-commands.4th 243660 2012-11-28 18:35:46Z dteske $
26
27marker task-menu-commands.4th
28
29include /boot/menusets.4th
30
31variable kernel_state
32variable root_state
33
34\
35\ Boot
36\
37
38: init_boot ( N -- N )
39 dup
40 s" boot_single" getenv -1 <> if

--- 233 unchanged lines hidden (view full) ---

274\ Kernel
275\
276
277: init_kernel ( N -- N )
278 kernel_state @ ( n -- n k )
279 init_cyclestate ( n k -- n )
280;
281
282: cycle_kernel ( N -- N TRUE )
283 cycle_menuitem
284 menu-redraw
285
286 \ Now we're going to make the change effective
287
288 dup cycle_stateN @
289 dup kernel_state ! \ save a copy for re-initialization
290 48 + \ convert to ASCII numeral
291
292 s" set kernel=${kernel_prefix}${kernel[N]}${kernel_suffix}"
293 36 +c! \ replace 'N' with ASCII numeral
294 evaluate \ sets $kernel to full kernel-path
295
296 TRUE \ loop menu again
297;
298
299\
300\ Root
301\
302
303: init_root ( N -- N )
304 root_state @ ( n -- n k )
305 init_cyclestate ( n k -- n )
306;
307
308: cycle_root ( N -- N TRUE )
309 cycle_menuitem
310 menu-redraw
311
312 \ Now we're going to make the change effective
313
314 dup cycle_stateN @
315 dup root_state ! \ save a copy for re-initialization
316 48 + \ convert to ASCII numeral
317
318 s" set root=${root_prefix}${root[N]}${root_suffix}"
319 30 +c! \ replace 'N' with ASCII numeral
320 evaluate \ sets $root to full root-path
321
322 TRUE \ loop menu again
323;
324
325\
326\ Menusets
327\
328
329: goto_menu ( N M -- N TRUE )
330 menu-unset

--- 16 unchanged lines hidden ---