dcons_os.c (158959) | dcons_os.c (164033) |
---|---|
1/*- 2 * Copyright (C) 2003,2004 3 * Hidetoshi Shimokawa. 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 --- 17 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * | 1/*- 2 * Copyright (C) 2003,2004 3 * Hidetoshi Shimokawa. 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 --- 17 unchanged lines hidden (view full) --- 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * |
34 * $FreeBSD: head/sys/dev/dcons/dcons_os.c 158959 2006-05-26 13:51:38Z phk $ | 34 * $FreeBSD: head/sys/dev/dcons/dcons_os.c 164033 2006-11-06 13:42:10Z rwatson $ |
35 */ 36 37#include <sys/param.h> 38#if __FreeBSD_version >= 502122 39#include <sys/kdb.h> 40#include <gdb/gdb.h> 41#endif 42#include <sys/kernel.h> 43#include <sys/module.h> 44#include <sys/systm.h> 45#include <sys/types.h> 46#include <sys/conf.h> 47#include <sys/cons.h> 48#include <sys/consio.h> 49#include <sys/tty.h> 50#include <sys/malloc.h> | 35 */ 36 37#include <sys/param.h> 38#if __FreeBSD_version >= 502122 39#include <sys/kdb.h> 40#include <gdb/gdb.h> 41#endif 42#include <sys/kernel.h> 43#include <sys/module.h> 44#include <sys/systm.h> 45#include <sys/types.h> 46#include <sys/conf.h> 47#include <sys/cons.h> 48#include <sys/consio.h> 49#include <sys/tty.h> 50#include <sys/malloc.h> |
51#include <sys/priv.h> |
|
51#include <sys/proc.h> 52#include <sys/ucred.h> 53 54#include <machine/bus.h> 55 56#ifdef __DragonFly__ 57#include "dcons.h" 58#include "dcons_os.h" --- 229 unchanged lines hidden (view full) --- 288 tp->t_dev = dev; 289 290 error = 0; 291 292 s = spltty(); 293 if ((tp->t_state & TS_ISOPEN) == 0) { 294 tp->t_state |= TS_CARR_ON; 295 ttyconsolemode(tp, 0); | 52#include <sys/proc.h> 53#include <sys/ucred.h> 54 55#include <machine/bus.h> 56 57#ifdef __DragonFly__ 58#include "dcons.h" 59#include "dcons_os.h" --- 229 unchanged lines hidden (view full) --- 289 tp->t_dev = dev; 290 291 error = 0; 292 293 s = spltty(); 294 if ((tp->t_state & TS_ISOPEN) == 0) { 295 tp->t_state |= TS_CARR_ON; 296 ttyconsolemode(tp, 0); |
296 } else if ((tp->t_state & TS_XCLUDE) && suser(td)) { | 297 } else if ((tp->t_state & TS_XCLUDE) && 298 priv_check(td, PRIV_TTY_EXCLUSIVE)) { |
297 splx(s); 298 return (EBUSY); 299 } 300 splx(s); 301 302#if __FreeBSD_version < 502113 303 error = (*linesw[tp->t_line].l_open)(dev, tp); 304#else --- 437 unchanged lines hidden --- | 299 splx(s); 300 return (EBUSY); 301 } 302 splx(s); 303 304#if __FreeBSD_version < 502113 305 error = (*linesw[tp->t_line].l_open)(dev, tp); 306#else --- 437 unchanged lines hidden --- |