Deleted Added
sdiff udiff text old ( 138249 ) new ( 146698 )
full compact
1/*-
2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/boot/i386/libi386/bootinfo.c 138249 2004-12-01 04:59:33Z scottl $");
29
30#include <stand.h>
31#include <sys/param.h>
32#include <sys/reboot.h>
33#include <sys/linker.h>
34#include "bootstrap.h"
35#include "libi386.h"
36#include "btxv86.h"

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

54 {"boot_serial", RB_SERIAL},
55 {NULL, 0}
56};
57
58int
59bi_getboothowto(char *kargs)
60{
61 char *cp;
62 int howto;
63 int active;
64 int i;
65
66 /* Parse kargs */
67 howto = 0;
68 if (kargs != NULL) {
69 cp = kargs;
70 active = 0;
71 while (*cp != 0) {
72 if (!active && (*cp == '-')) {
73 active = 1;

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

112 }
113 cp++;
114 }
115 }
116 /* get equivalents from the environment */
117 for (i = 0; howto_names[i].ev != NULL; i++)
118 if (getenv(howto_names[i].ev) != NULL)
119 howto |= howto_names[i].mask;
120 if (!strcmp(getenv("console"), "comconsole"))
121 howto |= RB_SERIAL;
122 if (!strcmp(getenv("console"), "nullconsole"))
123 howto |= RB_MUTE;
124 return(howto);
125}
126
127/*
128 * Copy the environment into the load area starting at (addr).
129 * Each variable is formatted as <name>=<value>, with a single nul
130 * separating each variable, and a double nul terminating the environment.
131 */

--- 22 unchanged lines hidden ---