1/*-
2 * Copyright (c) 1998 Robert Nordier
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are freely
6 * permitted provided that the above copyright notice and this
7 * paragraph and the following disclaimer are duplicated in all
8 * such forms.
9 *
10 * This software is provided "AS IS" and without any express or
11 * implied warranties, including, without limitation, the implied
12 * warranties of merchantability and fitness for a particular
13 * purpose.
14 */
15
16#include <sys/cdefs.h>
17__FBSDID("$FreeBSD: head/sys/boot/i386/boot2/boot2.c 236405 2012-06-01 15:48:24Z jhb $");
18
19#include <sys/param.h>
20#include <sys/disklabel.h>
21#include <sys/diskmbr.h>
22#include <sys/dirent.h>
23#include <sys/reboot.h>
24
25#include <machine/bootinfo.h>
--- 384 unchanged lines hidden (view full) ---
410 }
411 for (i = 0; c != optstr[i]; i++)
412 if (i == NOPT - 1)
413 return -1;
414 opts ^= OPT_SET(flags[i]);
415 }
416 ioctrl = OPT_CHECK(RBX_DUAL) ? (IO_SERIAL|IO_KEYBOARD) :
417 OPT_CHECK(RBX_SERIAL) ? IO_SERIAL : IO_KEYBOARD;
418 if (ioctrl & IO_SERIAL)
419 sio_init(115200 / comspeed);
420 } else {
421 for (q = arg--; *q && *q != '('; q++);
422 if (*q) {
423 drv = -1;
424 if (arg[1] == ':') {
425 drv = *arg - '0';
426 if (drv > 9)
427 return (-1);
--- 229 unchanged lines hidden ---
2 * Copyright (c) 1998 Robert Nordier
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are freely
6 * permitted provided that the above copyright notice and this
7 * paragraph and the following disclaimer are duplicated in all
8 * such forms.
9 *
10 * This software is provided "AS IS" and without any express or
11 * implied warranties, including, without limitation, the implied
12 * warranties of merchantability and fitness for a particular
13 * purpose.
14 */
15
16#include <sys/cdefs.h>
17__FBSDID("$FreeBSD: head/sys/boot/i386/boot2/boot2.c 236405 2012-06-01 15:48:24Z jhb $");
18
19#include <sys/param.h>
20#include <sys/disklabel.h>
21#include <sys/diskmbr.h>
22#include <sys/dirent.h>
23#include <sys/reboot.h>
24
25#include <machine/bootinfo.h>
--- 384 unchanged lines hidden (view full) ---
410 }
411 for (i = 0; c != optstr[i]; i++)
412 if (i == NOPT - 1)
413 return -1;
414 opts ^= OPT_SET(flags[i]);
415 }
416 ioctrl = OPT_CHECK(RBX_DUAL) ? (IO_SERIAL|IO_KEYBOARD) :
417 OPT_CHECK(RBX_SERIAL) ? IO_SERIAL : IO_KEYBOARD;
418 if (ioctrl & IO_SERIAL)
419 sio_init(115200 / comspeed);
420 } else {
421 for (q = arg--; *q && *q != '('; q++);
422 if (*q) {
423 drv = -1;
424 if (arg[1] == ':') {
425 drv = *arg - '0';
426 if (drv > 9)
427 return (-1);
--- 229 unchanged lines hidden ---