move copyin() call so if uap->size pointer is null, still return size
[unix-history] / usr / src / sys / kern / tty_conf.c
CommitLineData
f406ae69
KB
1/*-
2 * Copyright (c) 1982, 1986, 1991 The Regents of the University of California.
3 * All rights reserved.
da7c5cc6 4 *
f406ae69
KB
5 * %sccs.include.redist.c%
6 *
7 * @(#)tty_conf.c 7.6 (Berkeley) %G%
da7c5cc6 8 */
de2d206e 9
94368568
JB
10#include "param.h"
11#include "systm.h"
12#include "buf.h"
3358b36b 13#include "ioctl.h"
94368568
JB
14#include "tty.h"
15#include "conf.h"
de2d206e 16
03022474
KM
17int enodev();
18int nullop();
de2d206e 19
605d7712
MK
20int ttyopen(),ttylclose(),ttread(),ttwrite(),nullioctl(),ttstart();
21int ttymodem(), nullmodem(), ttyinput();
de2d206e 22
de2d206e
BJ
23#include "tb.h"
24#if NTB > 0
25int tbopen(),tbclose(),tbread(),tbinput(),tbioctl();
26#endif
03022474 27
5d6d0450
MK
28#include "sl.h"
29#if NSL > 0
30int slopen(),slclose(),slinput(),sltioctl(),slstart();
31#endif
32
de2d206e
BJ
33
34struct linesw linesw[] =
35{
e39f9ea6 36 ttyopen, ttylclose, ttread, ttwrite, nullioctl,
03022474 37 ttyinput, enodev, nullop, ttstart, ttymodem, /* 0- termios */
5982a210 38
03022474
KM
39 enodev, enodev, enodev, enodev, enodev, /* 1- defunct */
40 enodev, enodev, enodev, enodev, enodev,
5982a210 41
03022474
KM
42 enodev, enodev, enodev, enodev, enodev, /* 2- defunct */
43 enodev, enodev, enodev, enodev, enodev,
de2d206e 44#if NTB > 0
03022474
KM
45 tbopen, tbclose, tbread, enodev, tbioctl,
46 tbinput, enodev, nullop, ttstart, nullmodem, /* 3- TABLDISC */
5d6d0450 47#else
03022474
KM
48 enodev, enodev, enodev, enodev, enodev,
49 enodev, enodev, enodev, enodev, enodev,
5d6d0450
MK
50#endif
51#if NSL > 0
03022474
KM
52 slopen, slclose, enodev, enodev, sltioctl,
53 slinput, enodev, nullop, slstart, nullmodem, /* 4- SLIPDISC */
de2d206e 54#else
03022474
KM
55 enodev, enodev, enodev, enodev, enodev,
56 enodev, enodev, enodev, enodev, enodev,
de2d206e 57#endif
de2d206e
BJ
58};
59
dc717036 60int nldisp = sizeof (linesw) / sizeof (linesw[0]);
88a7a62a
SL
61
62/*
63 * Do nothing specific version of line
64 * discipline specific ioctl command.
65 */
66/*ARGSUSED*/
67nullioctl(tp, cmd, data, flags)
68 struct tty *tp;
69 char *data;
70 int flags;
71{
72
73#ifdef lint
74 tp = tp; data = data; flags = flags;
75#endif
76 return (-1);
77}