Wed Apr 17 18:01:29 2024 UTC (22d)
sys/conf.h: Need sys/types.h for dev_t, devmajor_t.


(riastradh)
diff -r1.161 -r1.162 src/sys/sys/conf.h

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

--- src/sys/sys/conf.h 2022/03/28 12:39:18 1.161
+++ src/sys/sys/conf.h 2024/04/17 18:01:29 1.162
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: conf.h,v 1.161 2022/03/28 12:39:18 riastradh Exp $ */ 1/* $NetBSD: conf.h,v 1.162 2024/04/17 18:01:29 riastradh 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:
@@ -33,28 +33,29 @@ @@ -33,28 +33,29 @@
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE. 34 * SUCH DAMAGE.
35 * 35 *
36 * @(#)conf.h 8.5 (Berkeley) 1/9/95 36 * @(#)conf.h 8.5 (Berkeley) 1/9/95
37 */ 37 */
38 38
39#ifndef _SYS_CONF_H_ 39#ifndef _SYS_CONF_H_
40#define _SYS_CONF_H_ 40#define _SYS_CONF_H_
41 41
42/* 42/*
43 * Definitions of device driver entry switches 43 * Definitions of device driver entry switches
44 */ 44 */
45 45
46#include <sys/queue.h> 
47#include <sys/device_if.h> 46#include <sys/device_if.h>
 47#include <sys/queue.h>
 48#include <sys/types.h>
48 49
49struct buf; 50struct buf;
50struct knote; 51struct knote;
51struct lwp; 52struct lwp;
52struct tty; 53struct tty;
53struct uio; 54struct uio;
54struct vnode; 55struct vnode;
55 56
56/* 57/*
57 * Types for d_flag 58 * Types for d_flag
58 */ 59 */
59#define D_OTHER 0x0000 60#define D_OTHER 0x0000
60#define D_TAPE 0x0001 61#define D_TAPE 0x0001
@@ -99,27 +100,27 @@ struct cdevsw { @@ -99,27 +100,27 @@ struct cdevsw {
99 int (*d_kqfilter)(dev_t, struct knote *); 100 int (*d_kqfilter)(dev_t, struct knote *);
100 int (*d_discard)(dev_t, off_t, off_t); 101 int (*d_discard)(dev_t, off_t, off_t);
101 int (*d_devtounit)(dev_t); 102 int (*d_devtounit)(dev_t);
102 struct cfdriver *d_cfdriver; 103 struct cfdriver *d_cfdriver;
103 int d_flag; 104 int d_flag;
104}; 105};
105 106
106#ifdef _KERNEL 107#ifdef _KERNEL
107 108
108#include <sys/mutex.h> 109#include <sys/mutex.h>
109extern kmutex_t device_lock; 110extern kmutex_t device_lock;
110 111
111int devsw_attach(const char *, const struct bdevsw *, devmajor_t *, 112int devsw_attach(const char *, const struct bdevsw *, devmajor_t *,
112 const struct cdevsw *, devmajor_t *); 113 const struct cdevsw *, devmajor_t *);
113void devsw_detach(const struct bdevsw *, const struct cdevsw *); 114void devsw_detach(const struct bdevsw *, const struct cdevsw *);
114const struct bdevsw *bdevsw_lookup(dev_t); 115const struct bdevsw *bdevsw_lookup(dev_t);
115const struct cdevsw *cdevsw_lookup(dev_t); 116const struct cdevsw *cdevsw_lookup(dev_t);
116devmajor_t bdevsw_lookup_major(const struct bdevsw *); 117devmajor_t bdevsw_lookup_major(const struct bdevsw *);
117devmajor_t cdevsw_lookup_major(const struct cdevsw *); 118devmajor_t cdevsw_lookup_major(const struct cdevsw *);
118 119
119typedef int dev_open_t(dev_t, int, int, struct lwp *); 120typedef int dev_open_t(dev_t, int, int, struct lwp *);
120typedef int dev_cancel_t(dev_t, int, int, struct lwp *); 121typedef int dev_cancel_t(dev_t, int, int, struct lwp *);
121typedef int dev_close_t(dev_t, int, int, struct lwp *); 122typedef int dev_close_t(dev_t, int, int, struct lwp *);
122typedef int dev_read_t(dev_t, struct uio *, int); 123typedef int dev_read_t(dev_t, struct uio *, int);
123typedef int dev_write_t(dev_t, struct uio *, int); 124typedef int dev_write_t(dev_t, struct uio *, int);
124typedef int dev_ioctl_t(dev_t, u_long, void *, int, struct lwp *); 125typedef int dev_ioctl_t(dev_t, u_long, void *, int, struct lwp *);
125typedef void dev_stop_t(struct tty *, int); 126typedef void dev_stop_t(struct tty *, int);