summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authorpst <pst@FreeBSD.org>1995-02-25 20:09:44 +0000
committerpst <pst@FreeBSD.org>1995-02-25 20:09:44 +0000
commit1dcb420b646ff6fd0ab578e340fd7f26b32ed79d (patch)
tree1f0482b969de4dd457ac5b450c026dcaab6317e2 /sys/gnu
parent04958419e842202587df95082c8717fe0b164213 (diff)
downloadFreeBSD-src-1dcb420b646ff6fd0ab578e340fd7f26b32ed79d.zip
FreeBSD-src-1dcb420b646ff6fd0ab578e340fd7f26b32ed79d.tar.gz
(a) remove the pointer to each driver's tty structure array from cdevsw
(b) add a function callback vector to tty drivers that will return a pointer to a valid tty structure based upon a dev_t (c) make syscons structures the same size whether or not APM is enabled so utilities don't crash if NAPM changes (and make the damn kernel compile!) (d) rewrite /dev/snp ioctl interface so that it is device driver and i386 independant
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/isdn/iitty.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/sys/gnu/isdn/iitty.c b/sys/gnu/isdn/iitty.c
index bb3ac06..0ca62f5 100644
--- a/sys/gnu/isdn/iitty.c
+++ b/sys/gnu/isdn/iitty.c
@@ -1,6 +1,6 @@
-static char _ittyid[] = "@(#)$Id: iitty.c,v 1.1 1995/02/14 15:00:32 jkh Exp $";
+static char _ittyid[] = "@(#)$Id: iitty.c,v 1.2 1995/02/15 06:28:28 jkh Exp $";
/*******************************************************************************
- * II - Version 0.1 $Revision: 1.1 $ $State: Exp $
+ * II - Version 0.1 $Revision: 1.2 $ $State: Exp $
*
* Copyright 1994 Dietmar Friede
*******************************************************************************
@@ -10,6 +10,9 @@ static char _ittyid[] = "@(#)$Id: iitty.c,v 1.1 1995/02/14 15:00:32 jkh Exp
*
*******************************************************************************
* $Log: iitty.c,v $
+ * Revision 1.2 1995/02/15 06:28:28 jkh
+ * Fix up include paths, nuke some warnings.
+ *
* Revision 1.1 1995/02/14 15:00:32 jkh
* An ISDN driver that supports the EDSS1 and the 1TR6 ISDN interfaces.
* EDSS1 is the "Euro-ISDN", 1TR6 is the soon obsolete german ISDN Interface.
@@ -321,10 +324,24 @@ itystop(struct tty *tp, int flag)
splx(s);
}
+struct tty *
+itydevtotty(dev_t dev)
+{
+ register int unit = UNIT(dev);
+ if (unit >= next_if)
+ return (NULL);
+
+ return (&ity_tty[unit]);
+}
+
int
ityselect(dev_t dev, int rw, struct proc *p)
{
- return (ttselect(dev, rw, p));
+ register int unit = UNIT(dev);
+ if (unit >= next_if)
+ return (ENXIO);
+
+ return (ttyselect(&ity_tty[unit], rw, p));
}
#endif
OpenPOWER on IntegriCloud