Deleted Added
sdiff udiff text old ( 120544 ) new ( 126076 )
full compact
1/*
2 * Copyright (C) 2001 Benno Rice.
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

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

19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: head/sys/dev/ofw/ofw_console.c 126076 2004-02-21 19:42:58Z phk $");
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/dev/ofw/ofw_console.c 126076 2004-02-21 19:42:58Z phk $");
31
32#include "opt_ddb.h"
33#include "opt_comconsole.h"
34
35#include <sys/param.h>
36#include <sys/kernel.h>
37#include <sys/systm.h>
38#include <sys/types.h>

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

46#include <ddb/ddb.h>
47
48#define OFW_POLL_HZ 4
49
50static d_open_t ofw_dev_open;
51static d_close_t ofw_dev_close;
52static d_ioctl_t ofw_dev_ioctl;
53
54
55static struct cdevsw ofw_cdevsw = {
56 .d_open = ofw_dev_open,
57 .d_close = ofw_dev_close,
58 .d_read = ttyread,
59 .d_write = ttywrite,
60 .d_ioctl = ofw_dev_ioctl,
61 .d_poll = ttypoll,
62 .d_name = "ofw",
63};
64
65static struct tty *ofw_tp = NULL;
66static int polltime;
67static struct callout_handle ofw_timeouthandle
68 = CALLOUT_HANDLE_INITIALIZER(&ofw_timeouthandle);
69
70#if defined(DDB) && defined(ALT_BREAK_TO_DEBUGGER)

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

99 sizeof(output)) == -1)
100 return;
101 dev = make_dev(&ofw_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "%s",
102 output);
103 make_dev_alias(dev, "ofwcons");
104 }
105}
106
107SYSINIT(cndev, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, cn_drvinit, NULL)
108
109static int stdin;
110static int stdout;
111
112static int
113ofw_dev_open(dev_t dev, int flag, int mode, struct thread *td)
114{
115 struct tty *tp;

--- 225 unchanged lines hidden ---