1/*-
2 * Copyright (c) 1992-1995 S�ren Schmidt
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 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $Id: syscons.c,v 1.120 1995/07/11 18:34:29 bde Exp $
29 */
30
31#include "sc.h"
32#include "apm.h"
33#if NSC > 0
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/conf.h>
--- 310 unchanged lines hidden (view full) ---
347 ttychars(tp);
348 tp->t_iflag = TTYDEF_IFLAG;
349 tp->t_oflag = TTYDEF_OFLAG;
350 tp->t_cflag = TTYDEF_CFLAG;
351 tp->t_lflag = TTYDEF_LFLAG;
352 tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
353 scparam(tp, &tp->t_termios);
354 ttsetwater(tp);
355 }
356 else
357 if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0)
358 return(EBUSY);
359 tp->t_state |= TS_CARR_ON;
360 tp->t_cflag |= CLOCAL;
361 if (!console[minor(dev)])
362 console[minor(dev)] = alloc_scp();
363 return((*linesw[tp->t_line].l_open)(dev, tp));
364}
365
366int
367scclose(dev_t dev, int flag, int mode, struct proc *p)
368{
--- 2699 unchanged lines hidden ---
2 * Copyright (c) 1992-1995 S�ren Schmidt
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 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $Id: syscons.c,v 1.120 1995/07/11 18:34:29 bde Exp $
29 */
30
31#include "sc.h"
32#include "apm.h"
33#if NSC > 0
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/conf.h>
--- 310 unchanged lines hidden (view full) ---
347 ttychars(tp);
348 tp->t_iflag = TTYDEF_IFLAG;
349 tp->t_oflag = TTYDEF_OFLAG;
350 tp->t_cflag = TTYDEF_CFLAG;
351 tp->t_lflag = TTYDEF_LFLAG;
352 tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
353 scparam(tp, &tp->t_termios);
354 ttsetwater(tp);
355 }
356 else
357 if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0)
358 return(EBUSY);
359 tp->t_state |= TS_CARR_ON;
360 tp->t_cflag |= CLOCAL;
361 if (!console[minor(dev)])
362 console[minor(dev)] = alloc_scp();
363 return((*linesw[tp->t_line].l_open)(dev, tp));
364}
365
366int
367scclose(dev_t dev, int flag, int mode, struct proc *p)
368{
--- 2699 unchanged lines hidden ---