Deleted Added
full compact
ite.c (1.41) ite.c (1.42)
1/* $NetBSD: ite.c,v 1.41 1996/05/19 19:03:06 is Exp $ */
1/* $NetBSD: ite.c,v 1.42 1996/06/06 04:47:31 mhitch Exp $ */
2
3/*
4 * Copyright (c) 1988 University of Utah.
5 * Copyright (c) 1990 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by
9 * the Systems Programming Group of the University of Utah Computer

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

439 unit = ITEUNIT(dev);
440 first = 0;
441
442 if (((1 << unit) & ite_confunits) == 0)
443 return (ENXIO);
444
445 ip = getitesp(dev);
446
2
3/*
4 * Copyright (c) 1988 University of Utah.
5 * Copyright (c) 1990 The Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by
9 * the Systems Programming Group of the University of Utah Computer

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

439 unit = ITEUNIT(dev);
440 first = 0;
441
442 if (((1 << unit) & ite_confunits) == 0)
443 return (ENXIO);
444
445 ip = getitesp(dev);
446
447 if (ip->tp == NULL)
447 if (ip->tp == NULL) {
448 tp = ip->tp = ttymalloc();
448 tp = ip->tp = ttymalloc();
449 else
449 tty_attach(tp);
450 } else
450 tp = ip->tp;
451 if ((tp->t_state & (TS_ISOPEN | TS_XCLUDE)) == (TS_ISOPEN | TS_XCLUDE)
452 && p->p_ucred->cr_uid != 0)
453 return (EBUSY);
454 if ((ip->flags & ITE_ACTIVE) == 0) {
455 error = ite_on(dev, 0);
456 if (error)
457 return (error);

--- 1836 unchanged lines hidden ---
451 tp = ip->tp;
452 if ((tp->t_state & (TS_ISOPEN | TS_XCLUDE)) == (TS_ISOPEN | TS_XCLUDE)
453 && p->p_ucred->cr_uid != 0)
454 return (EBUSY);
455 if ((ip->flags & ITE_ACTIVE) == 0) {
456 error = ite_on(dev, 0);
457 if (error)
458 return (error);

--- 1836 unchanged lines hidden ---