Tue Oct 8 12:49:56 2019 UTC ()
Convert ttynodisc() to devenodev and ttyerr*() to ttyenodev too.

Missed in previous.  Of these - only ttyerrio() is used, the rest are
just courtesy "for those defining their own line disciplines".  So may
be we should bring back ttyerrinput() too.


(uwe)
diff -r1.153 -r1.154 src/sys/sys/conf.h

cvs diff -r1.153 -r1.154 src/sys/sys/conf.h (expand / switch to unified diff)

--- src/sys/sys/conf.h 2019/10/08 07:33:14 1.153
+++ src/sys/sys/conf.h 2019/10/08 12:49:56 1.154
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: conf.h,v 1.153 2019/10/08 07:33:14 mrg Exp $ */ 1/* $NetBSD: conf.h,v 1.154 2019/10/08 12:49:56 uwe Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1990, 1993 4 * Copyright (c) 1990, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * (c) UNIX System Laboratories, Inc. 6 * (c) UNIX System Laboratories, Inc.
7 * All or some portions of this file are derived from material licensed 7 * All or some portions of this file are derived from material licensed
8 * to the University of California by American Telephone and Telegraph 8 * to the University of California by American Telephone and Telegraph
9 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 9 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
10 * the permission of UNIX System Laboratories, Inc. 10 * the permission of UNIX System Laboratories, Inc.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions 13 * modification, are permitted provided that the following conditions
14 * are met: 14 * are met:
@@ -213,30 +213,30 @@ struct linesw { @@ -213,30 +213,30 @@ struct linesw {
213 int (*l_poll) (struct tty *, int, struct lwp *); 213 int (*l_poll) (struct tty *, int, struct lwp *);
214}; 214};
215 215
216#ifdef _KERNEL 216#ifdef _KERNEL
217void ttyldisc_init(void); 217void ttyldisc_init(void);
218int ttyldisc_attach(struct linesw *); 218int ttyldisc_attach(struct linesw *);
219int ttyldisc_detach(struct linesw *); 219int ttyldisc_detach(struct linesw *);
220struct linesw *ttyldisc_lookup(const char *); 220struct linesw *ttyldisc_lookup(const char *);
221struct linesw *ttyldisc_lookup_bynum(int); 221struct linesw *ttyldisc_lookup_bynum(int);
222struct linesw *ttyldisc_default(void); 222struct linesw *ttyldisc_default(void);
223void ttyldisc_release(struct linesw *); 223void ttyldisc_release(struct linesw *);
224 224
225/* For those defining their own line disciplines: */ 225/* For those defining their own line disciplines: */
226#define ttynodisc ((int (*)(dev_t, struct tty *))enodev) 226#define ttynodisc ((int (*)(dev_t, struct tty *))devenodev)
227#define ttyerrclose ((int (*)(struct tty *, int))enodev) 227#define ttyerrclose ((int (*)(struct tty *, int))ttyenodev)
228#define ttyerrio ((int (*)(struct tty *, struct uio *, int))enodev) 228#define ttyerrio ((int (*)(struct tty *, struct uio *, int))ttyenodev)
229#define ttyerrstart ((int (*)(struct tty *))enodev) 229#define ttyerrstart ((int (*)(struct tty *))ttyenodev)
230 230
231int ttyerrpoll (struct tty *, int, struct lwp *); 231int ttyerrpoll (struct tty *, int, struct lwp *);
232int ttynullioctl(struct tty *, u_long, void *, int, struct lwp *); 232int ttynullioctl(struct tty *, u_long, void *, int, struct lwp *);
233 233
234int iskmemdev(dev_t); 234int iskmemdev(dev_t);
235int seltrue_kqfilter(dev_t, struct knote *); 235int seltrue_kqfilter(dev_t, struct knote *);
236#endif 236#endif
237 237
238#ifdef _KERNEL 238#ifdef _KERNEL
239 239
240#define DEV_MEM 0 /* minor device 0 is physical memory */ 240#define DEV_MEM 0 /* minor device 0 is physical memory */
241#define DEV_KMEM 1 /* minor device 1 is kernel memory */ 241#define DEV_KMEM 1 /* minor device 1 is kernel memory */
242#define DEV_NULL 2 /* minor device 2 is EOF/rathole */ 242#define DEV_NULL 2 /* minor device 2 is EOF/rathole */