Pull up following revision(s) (requested by mrg in ticket #1025): sys/kern/subr_autoconf.c: revision 1.263 sys/kern/kern_drvctl.c: revision 1.44 sys/sys/device.h: revision 1.156 sys/sys/systm.h: revision 1.278 - move export for devmon_insert_vec into sys/device.h. - export root_is_mounted for future USB RB_ASKNAME hack. - make some things in subr_autoconf.c static - move device_printf() prototype out from the middle of two sets of aprint_*() prototypes.diff -r1.42 -r1.42.2.1 src/sys/kern/kern_drvctl.c
(martin)
--- src/sys/kern/kern_drvctl.c 2017/06/01 02:45:13 1.42
+++ src/sys/kern/kern_drvctl.c 2018/09/23 17:33:15 1.42.2.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: kern_drvctl.c,v 1.42 2017/06/01 02:45:13 chs Exp $ */ | 1 | /* $NetBSD: kern_drvctl.c,v 1.42.2.1 2018/09/23 17:33:15 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2004 | 4 | * Copyright (c) 2004 | |
5 | * Matthias Drochner. All rights reserved. | 5 | * Matthias Drochner. All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions, and the following disclaimer. | 11 | * notice, this list of conditions, and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -17,27 +17,27 @@ | @@ -17,27 +17,27 @@ | |||
17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 17 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 20 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 21 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 22 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 23 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 24 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 25 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
26 | * SUCH DAMAGE. | 26 | * SUCH DAMAGE. | |
27 | */ | 27 | */ | |
28 | 28 | |||
29 | #include <sys/cdefs.h> | 29 | #include <sys/cdefs.h> | |
30 | __KERNEL_RCSID(0, "$NetBSD: kern_drvctl.c,v 1.42 2017/06/01 02:45:13 chs Exp $"); | 30 | __KERNEL_RCSID(0, "$NetBSD: kern_drvctl.c,v 1.42.2.1 2018/09/23 17:33:15 martin Exp $"); | |
31 | 31 | |||
32 | #include <sys/param.h> | 32 | #include <sys/param.h> | |
33 | #include <sys/systm.h> | 33 | #include <sys/systm.h> | |
34 | #include <sys/kernel.h> | 34 | #include <sys/kernel.h> | |
35 | #include <sys/conf.h> | 35 | #include <sys/conf.h> | |
36 | #include <sys/device.h> | 36 | #include <sys/device.h> | |
37 | #include <sys/event.h> | 37 | #include <sys/event.h> | |
38 | #include <sys/kmem.h> | 38 | #include <sys/kmem.h> | |
39 | #include <sys/ioctl.h> | 39 | #include <sys/ioctl.h> | |
40 | #include <sys/fcntl.h> | 40 | #include <sys/fcntl.h> | |
41 | #include <sys/file.h> | 41 | #include <sys/file.h> | |
42 | #include <sys/filedesc.h> | 42 | #include <sys/filedesc.h> | |
43 | #include <sys/select.h> | 43 | #include <sys/select.h> | |
@@ -96,27 +96,26 @@ static const struct fileops drvctl_fileo | @@ -96,27 +96,26 @@ static const struct fileops drvctl_fileo | |||
96 | .fo_read = drvctl_read, | 96 | .fo_read = drvctl_read, | |
97 | .fo_write = drvctl_write, | 97 | .fo_write = drvctl_write, | |
98 | .fo_ioctl = drvctl_ioctl, | 98 | .fo_ioctl = drvctl_ioctl, | |
99 | .fo_fcntl = fnullop_fcntl, | 99 | .fo_fcntl = fnullop_fcntl, | |
100 | .fo_poll = drvctl_poll, | 100 | .fo_poll = drvctl_poll, | |
101 | .fo_stat = drvctl_stat, | 101 | .fo_stat = drvctl_stat, | |
102 | .fo_close = drvctl_close, | 102 | .fo_close = drvctl_close, | |
103 | .fo_kqfilter = fnullop_kqfilter, | 103 | .fo_kqfilter = fnullop_kqfilter, | |
104 | .fo_restart = fnullop_restart, | 104 | .fo_restart = fnullop_restart, | |
105 | }; | 105 | }; | |
106 | 106 | |||
107 | #define MAXLOCATORS 100 | 107 | #define MAXLOCATORS 100 | |
108 | 108 | |||
109 | extern int (*devmon_insert_vec)(const char *, prop_dictionary_t); | |||
110 | static int (*saved_insert_vec)(const char *, prop_dictionary_t) = NULL; | 109 | static int (*saved_insert_vec)(const char *, prop_dictionary_t) = NULL; | |
111 | 110 | |||
112 | static int drvctl_command(struct lwp *, struct plistref *, u_long, int); | 111 | static int drvctl_command(struct lwp *, struct plistref *, u_long, int); | |
113 | static int drvctl_getevent(struct lwp *, struct plistref *, u_long, int); | 112 | static int drvctl_getevent(struct lwp *, struct plistref *, u_long, int); | |
114 | 113 | |||
115 | void | 114 | void | |
116 | drvctl_init(void) | 115 | drvctl_init(void) | |
117 | { | 116 | { | |
118 | TAILQ_INIT(&drvctl_eventq); | 117 | TAILQ_INIT(&drvctl_eventq); | |
119 | mutex_init(&drvctl_lock, MUTEX_DEFAULT, IPL_NONE); | 118 | mutex_init(&drvctl_lock, MUTEX_DEFAULT, IPL_NONE); | |
120 | cv_init(&drvctl_cond, "devmon"); | 119 | cv_init(&drvctl_cond, "devmon"); | |
121 | selinit(&drvctl_rdsel); | 120 | selinit(&drvctl_rdsel); | |
122 | } | 121 | } |
--- src/sys/kern/subr_autoconf.c 2017/06/01 02:45:13 1.253
+++ src/sys/kern/subr_autoconf.c 2018/09/23 17:33:15 1.253.2.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: subr_autoconf.c,v 1.253 2017/06/01 02:45:13 chs Exp $ */ | 1 | /* $NetBSD: subr_autoconf.c,v 1.253.2.1 2018/09/23 17:33:15 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1996, 2000 Christopher G. Demetriou | 4 | * Copyright (c) 1996, 2000 Christopher G. Demetriou | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -67,27 +67,27 @@ | @@ -67,27 +67,27 @@ | |||
67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
72 | * SUCH DAMAGE. | 72 | * SUCH DAMAGE. | |
73 | * | 73 | * | |
74 | * from: Header: subr_autoconf.c,v 1.12 93/02/01 19:31:48 torek Exp (LBL) | 74 | * from: Header: subr_autoconf.c,v 1.12 93/02/01 19:31:48 torek Exp (LBL) | |
75 | * | 75 | * | |
76 | * @(#)subr_autoconf.c 8.3 (Berkeley) 5/17/94 | 76 | * @(#)subr_autoconf.c 8.3 (Berkeley) 5/17/94 | |
77 | */ | 77 | */ | |
78 | 78 | |||
79 | #include <sys/cdefs.h> | 79 | #include <sys/cdefs.h> | |
80 | __KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.253 2017/06/01 02:45:13 chs Exp $"); | 80 | __KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.253.2.1 2018/09/23 17:33:15 martin Exp $"); | |
81 | 81 | |||
82 | #ifdef _KERNEL_OPT | 82 | #ifdef _KERNEL_OPT | |
83 | #include "opt_ddb.h" | 83 | #include "opt_ddb.h" | |
84 | #include "drvctl.h" | 84 | #include "drvctl.h" | |
85 | #endif | 85 | #endif | |
86 | 86 | |||
87 | #include <sys/param.h> | 87 | #include <sys/param.h> | |
88 | #include <sys/device.h> | 88 | #include <sys/device.h> | |
89 | #include <sys/disklabel.h> | 89 | #include <sys/disklabel.h> | |
90 | #include <sys/conf.h> | 90 | #include <sys/conf.h> | |
91 | #include <sys/kauth.h> | 91 | #include <sys/kauth.h> | |
92 | #include <sys/kmem.h> | 92 | #include <sys/kmem.h> | |
93 | #include <sys/systm.h> | 93 | #include <sys/systm.h> | |
@@ -182,37 +182,37 @@ static void config_dump_garbage(struct d | @@ -182,37 +182,37 @@ static void config_dump_garbage(struct d | |||
182 | static void pmflock_debug(device_t, const char *, int); | 182 | static void pmflock_debug(device_t, const char *, int); | |
183 | 183 | |||
184 | static device_t deviter_next1(deviter_t *); | 184 | static device_t deviter_next1(deviter_t *); | |
185 | static void deviter_reinit(deviter_t *); | 185 | static void deviter_reinit(deviter_t *); | |
186 | 186 | |||
187 | struct deferred_config { | 187 | struct deferred_config { | |
188 | TAILQ_ENTRY(deferred_config) dc_queue; | 188 | TAILQ_ENTRY(deferred_config) dc_queue; | |
189 | device_t dc_dev; | 189 | device_t dc_dev; | |
190 | void (*dc_func)(device_t); | 190 | void (*dc_func)(device_t); | |
191 | }; | 191 | }; | |
192 | 192 | |||
193 | TAILQ_HEAD(deferred_config_head, deferred_config); | 193 | TAILQ_HEAD(deferred_config_head, deferred_config); | |
194 | 194 | |||
195 | struct deferred_config_head deferred_config_queue = | 195 | static struct deferred_config_head deferred_config_queue = | |
196 | TAILQ_HEAD_INITIALIZER(deferred_config_queue); | 196 | TAILQ_HEAD_INITIALIZER(deferred_config_queue); | |
197 | struct deferred_config_head interrupt_config_queue = | 197 | static struct deferred_config_head interrupt_config_queue = | |
198 | TAILQ_HEAD_INITIALIZER(interrupt_config_queue); | 198 | TAILQ_HEAD_INITIALIZER(interrupt_config_queue); | |
199 | int interrupt_config_threads = 8; | 199 | static int interrupt_config_threads = 8; | |
200 | struct deferred_config_head mountroot_config_queue = | 200 | static struct deferred_config_head mountroot_config_queue = | |
201 | TAILQ_HEAD_INITIALIZER(mountroot_config_queue); | 201 | TAILQ_HEAD_INITIALIZER(mountroot_config_queue); | |
202 | int mountroot_config_threads = 2; | 202 | static int mountroot_config_threads = 2; | |
203 | static lwp_t **mountroot_config_lwpids; | 203 | static lwp_t **mountroot_config_lwpids; | |
204 | static size_t mountroot_config_lwpids_size; | 204 | static size_t mountroot_config_lwpids_size; | |
205 | static bool root_is_mounted = false; | 205 | bool root_is_mounted = false; | |
206 | 206 | |||
207 | static void config_process_deferred(struct deferred_config_head *, device_t); | 207 | static void config_process_deferred(struct deferred_config_head *, device_t); | |
208 | 208 | |||
209 | /* Hooks to finalize configuration once all real devices have been found. */ | 209 | /* Hooks to finalize configuration once all real devices have been found. */ | |
210 | struct finalize_hook { | 210 | struct finalize_hook { | |
211 | TAILQ_ENTRY(finalize_hook) f_list; | 211 | TAILQ_ENTRY(finalize_hook) f_list; | |
212 | int (*f_func)(device_t); | 212 | int (*f_func)(device_t); | |
213 | device_t f_dev; | 213 | device_t f_dev; | |
214 | }; | 214 | }; | |
215 | static TAILQ_HEAD(, finalize_hook) config_finalize_list = | 215 | static TAILQ_HEAD(, finalize_hook) config_finalize_list = | |
216 | TAILQ_HEAD_INITIALIZER(config_finalize_list); | 216 | TAILQ_HEAD_INITIALIZER(config_finalize_list); | |
217 | static int config_finalize_done; | 217 | static int config_finalize_done; | |
218 | 218 |
--- src/sys/sys/device.h 2016/06/19 09:35:06 1.149
+++ src/sys/sys/device.h 2018/09/23 17:33:15 1.149.10.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: device.h,v 1.149 2016/06/19 09:35:06 bouyer Exp $ */ | 1 | /* $NetBSD: device.h,v 1.149.10.1 2018/09/23 17:33:15 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1996, 2000 Christopher G. Demetriou | 4 | * Copyright (c) 1996, 2000 Christopher G. Demetriou | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -407,40 +407,42 @@ struct pdevinit { | @@ -407,40 +407,42 @@ struct pdevinit { | |||
407 | 407 | |||
408 | /* This allows us to wildcard a device unit. */ | 408 | /* This allows us to wildcard a device unit. */ | |
409 | #define DVUNIT_ANY -1 | 409 | #define DVUNIT_ANY -1 | |
410 | 410 | |||
411 | #ifdef _KERNEL | 411 | #ifdef _KERNEL | |
412 | 412 | |||
413 | extern struct cfdriverlist allcfdrivers;/* list of all cfdrivers */ | 413 | extern struct cfdriverlist allcfdrivers;/* list of all cfdrivers */ | |
414 | extern struct cftablelist allcftables; /* list of all cfdata tables */ | 414 | extern struct cftablelist allcftables; /* list of all cfdata tables */ | |
415 | extern device_t booted_device; /* the device we booted from */ | 415 | extern device_t booted_device; /* the device we booted from */ | |
416 | extern int booted_partition; /* the partition on that device */ | 416 | extern int booted_partition; /* the partition on that device */ | |
417 | extern daddr_t booted_startblk; /* or the start of a wedge */ | 417 | extern daddr_t booted_startblk; /* or the start of a wedge */ | |
418 | extern uint64_t booted_nblks; /* and the size of that wedge */ | 418 | extern uint64_t booted_nblks; /* and the size of that wedge */ | |
419 | extern char *bootspec; /* and the device/wedge name */ | 419 | extern char *bootspec; /* and the device/wedge name */ | |
420 | extern bool root_is_mounted; /* true if root is mounted */ | |||
420 | 421 | |||
421 | struct vnode *opendisk(device_t); | 422 | struct vnode *opendisk(device_t); | |
422 | int getdisksize(struct vnode *, uint64_t *, unsigned int *); | 423 | int getdisksize(struct vnode *, uint64_t *, unsigned int *); | |
423 | struct dkwedge_info; | 424 | struct dkwedge_info; | |
424 | int getdiskinfo(struct vnode *, struct dkwedge_info *); | 425 | int getdiskinfo(struct vnode *, struct dkwedge_info *); | |
425 | 426 | |||
426 | void config_init(void); | 427 | void config_init(void); | |
427 | int config_init_component(struct cfdriver *const*, | 428 | int config_init_component(struct cfdriver *const*, | |
428 | const struct cfattachinit *, struct cfdata *); | 429 | const struct cfattachinit *, struct cfdata *); | |
429 | int config_fini_component(struct cfdriver *const*, | 430 | int config_fini_component(struct cfdriver *const*, | |
430 | const struct cfattachinit *, struct cfdata *); | 431 | const struct cfattachinit *, struct cfdata *); | |
431 | void config_init_mi(void); | 432 | void config_init_mi(void); | |
432 | void drvctl_init(void); | 433 | void drvctl_init(void); | |
433 | void drvctl_fini(void); | 434 | void drvctl_fini(void); | |
435 | extern int (*devmon_insert_vec)(const char *, prop_dictionary_t); | |||
434 | 436 | |||
435 | int config_cfdriver_attach(struct cfdriver *); | 437 | int config_cfdriver_attach(struct cfdriver *); | |
436 | int config_cfdriver_detach(struct cfdriver *); | 438 | int config_cfdriver_detach(struct cfdriver *); | |
437 | 439 | |||
438 | int config_cfattach_attach(const char *, struct cfattach *); | 440 | int config_cfattach_attach(const char *, struct cfattach *); | |
439 | int config_cfattach_detach(const char *, struct cfattach *); | 441 | int config_cfattach_detach(const char *, struct cfattach *); | |
440 | 442 | |||
441 | int config_cfdata_attach(cfdata_t, int); | 443 | int config_cfdata_attach(cfdata_t, int); | |
442 | int config_cfdata_detach(cfdata_t); | 444 | int config_cfdata_detach(cfdata_t); | |
443 | 445 | |||
444 | struct cfdriver *config_cfdriver_lookup(const char *); | 446 | struct cfdriver *config_cfdriver_lookup(const char *); | |
445 | struct cfattach *config_cfattach_lookup(const char *, const char *); | 447 | struct cfattach *config_cfattach_lookup(const char *, const char *); | |
446 | const struct cfiattrdata *cfiattr_lookup(const char *, const struct cfdriver *); | 448 | const struct cfiattrdata *cfiattr_lookup(const char *, const struct cfdriver *); |
--- src/sys/sys/systm.h 2016/12/22 16:05:15 1.272
+++ src/sys/sys/systm.h 2018/09/23 17:33:15 1.272.8.1
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: systm.h,v 1.272 2016/12/22 16:05:15 cherry Exp $ */ | 1 | /* $NetBSD: systm.h,v 1.272.8.1 2018/09/23 17:33:15 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1982, 1988, 1991, 1993 | 4 | * Copyright (c) 1982, 1988, 1991, 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: | |
@@ -184,34 +184,34 @@ enum hashtype { | @@ -184,34 +184,34 @@ enum hashtype { | |||
184 | #ifdef _KERNEL | 184 | #ifdef _KERNEL | |
185 | void *hashinit(u_int, enum hashtype, bool, u_long *); | 185 | void *hashinit(u_int, enum hashtype, bool, u_long *); | |
186 | void hashdone(void *, enum hashtype, u_long); | 186 | void hashdone(void *, enum hashtype, u_long); | |
187 | int seltrue(dev_t, int, struct lwp *); | 187 | int seltrue(dev_t, int, struct lwp *); | |
188 | int sys_nosys(struct lwp *, const void *, register_t *); | 188 | int sys_nosys(struct lwp *, const void *, register_t *); | |
189 | int sys_nomodule(struct lwp *, const void *, register_t *); | 189 | int sys_nomodule(struct lwp *, const void *, register_t *); | |
190 | 190 | |||
191 | void aprint_normal(const char *, ...) __printflike(1, 2); | 191 | void aprint_normal(const char *, ...) __printflike(1, 2); | |
192 | void aprint_error(const char *, ...) __printflike(1, 2); | 192 | void aprint_error(const char *, ...) __printflike(1, 2); | |
193 | void aprint_naive(const char *, ...) __printflike(1, 2); | 193 | void aprint_naive(const char *, ...) __printflike(1, 2); | |
194 | void aprint_verbose(const char *, ...) __printflike(1, 2); | 194 | void aprint_verbose(const char *, ...) __printflike(1, 2); | |
195 | void aprint_debug(const char *, ...) __printflike(1, 2); | 195 | void aprint_debug(const char *, ...) __printflike(1, 2); | |
196 | 196 | |||
197 | void device_printf(device_t, const char *fmt, ...) __printflike(2, 3); | |||
198 | ||||
199 | void aprint_normal_dev(device_t, const char *, ...) __printflike(2, 3); | 197 | void aprint_normal_dev(device_t, const char *, ...) __printflike(2, 3); | |
200 | void aprint_error_dev(device_t, const char *, ...) __printflike(2, 3); | 198 | void aprint_error_dev(device_t, const char *, ...) __printflike(2, 3); | |
201 | void aprint_naive_dev(device_t, const char *, ...) __printflike(2, 3); | 199 | void aprint_naive_dev(device_t, const char *, ...) __printflike(2, 3); | |
202 | void aprint_verbose_dev(device_t, const char *, ...) __printflike(2, 3); | 200 | void aprint_verbose_dev(device_t, const char *, ...) __printflike(2, 3); | |
203 | void aprint_debug_dev(device_t, const char *, ...) __printflike(2, 3); | 201 | void aprint_debug_dev(device_t, const char *, ...) __printflike(2, 3); | |
204 | 202 | |||
203 | void device_printf(device_t, const char *fmt, ...) __printflike(2, 3); | |||
204 | ||||
205 | struct ifnet; | 205 | struct ifnet; | |
206 | 206 | |||
207 | void aprint_normal_ifnet(struct ifnet *, const char *, ...) | 207 | void aprint_normal_ifnet(struct ifnet *, const char *, ...) | |
208 | __printflike(2, 3); | 208 | __printflike(2, 3); | |
209 | void aprint_error_ifnet(struct ifnet *, const char *, ...) | 209 | void aprint_error_ifnet(struct ifnet *, const char *, ...) | |
210 | __printflike(2, 3); | 210 | __printflike(2, 3); | |
211 | void aprint_naive_ifnet(struct ifnet *, const char *, ...) | 211 | void aprint_naive_ifnet(struct ifnet *, const char *, ...) | |
212 | __printflike(2, 3); | 212 | __printflike(2, 3); | |
213 | void aprint_verbose_ifnet(struct ifnet *, const char *, ...) | 213 | void aprint_verbose_ifnet(struct ifnet *, const char *, ...) | |
214 | __printflike(2, 3); | 214 | __printflike(2, 3); | |
215 | void aprint_debug_ifnet(struct ifnet *, const char *, ...) | 215 | void aprint_debug_ifnet(struct ifnet *, const char *, ...) | |
216 | __printflike(2, 3); | 216 | __printflike(2, 3); | |
217 | 217 |