Module Name: src Committed By: mrg Date: Tue Sep 18 01:25:09 UTC 2018
Modified Files: src/sys/kern: kern_drvctl.c subr_autoconf.c src/sys/sys: device.h systm.h Log Message: - 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. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/kern/kern_drvctl.c cvs rdiff -u -r1.262 -r1.263 src/sys/kern/subr_autoconf.c cvs rdiff -u -r1.155 -r1.156 src/sys/sys/device.h cvs rdiff -u -r1.277 -r1.278 src/sys/sys/systm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/kern_drvctl.c diff -u src/sys/kern/kern_drvctl.c:1.43 src/sys/kern/kern_drvctl.c:1.44 --- src/sys/kern/kern_drvctl.c:1.43 Thu Nov 30 20:25:55 2017 +++ src/sys/kern/kern_drvctl.c Tue Sep 18 01:25:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_drvctl.c,v 1.43 2017/11/30 20:25:55 christos Exp $ */ +/* $NetBSD: kern_drvctl.c,v 1.44 2018/09/18 01:25:09 mrg Exp $ */ /* * Copyright (c) 2004 @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kern_drvctl.c,v 1.43 2017/11/30 20:25:55 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_drvctl.c,v 1.44 2018/09/18 01:25:09 mrg Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -107,7 +107,6 @@ static const struct fileops drvctl_fileo #define MAXLOCATORS 100 -extern int (*devmon_insert_vec)(const char *, prop_dictionary_t); static int (*saved_insert_vec)(const char *, prop_dictionary_t) = NULL; static int drvctl_command(struct lwp *, struct plistref *, u_long, int); Index: src/sys/kern/subr_autoconf.c diff -u src/sys/kern/subr_autoconf.c:1.262 src/sys/kern/subr_autoconf.c:1.263 --- src/sys/kern/subr_autoconf.c:1.262 Tue Jun 26 06:03:57 2018 +++ src/sys/kern/subr_autoconf.c Tue Sep 18 01:25:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_autoconf.c,v 1.262 2018/06/26 06:03:57 thorpej Exp $ */ +/* $NetBSD: subr_autoconf.c,v 1.263 2018/09/18 01:25:09 mrg Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.262 2018/06/26 06:03:57 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.263 2018/09/18 01:25:09 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -192,17 +192,17 @@ struct deferred_config { TAILQ_HEAD(deferred_config_head, deferred_config); -struct deferred_config_head deferred_config_queue = +static struct deferred_config_head deferred_config_queue = TAILQ_HEAD_INITIALIZER(deferred_config_queue); -struct deferred_config_head interrupt_config_queue = +static struct deferred_config_head interrupt_config_queue = TAILQ_HEAD_INITIALIZER(interrupt_config_queue); -int interrupt_config_threads = 8; -struct deferred_config_head mountroot_config_queue = +static int interrupt_config_threads = 8; +static struct deferred_config_head mountroot_config_queue = TAILQ_HEAD_INITIALIZER(mountroot_config_queue); -int mountroot_config_threads = 2; +static int mountroot_config_threads = 2; static lwp_t **mountroot_config_lwpids; static size_t mountroot_config_lwpids_size; -static bool root_is_mounted = false; +bool root_is_mounted = false; static void config_process_deferred(struct deferred_config_head *, device_t); Index: src/sys/sys/device.h diff -u src/sys/sys/device.h:1.155 src/sys/sys/device.h:1.156 --- src/sys/sys/device.h:1.155 Tue Jun 26 06:03:57 2018 +++ src/sys/sys/device.h Tue Sep 18 01:25:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.155 2018/06/26 06:03:57 thorpej Exp $ */ +/* $NetBSD: device.h,v 1.156 2018/09/18 01:25:09 mrg Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -427,6 +427,7 @@ extern int booted_partition; /* the par extern daddr_t booted_startblk; /* or the start of a wedge */ extern uint64_t booted_nblks; /* and the size of that wedge */ extern char *bootspec; /* and the device/wedge name */ +extern bool root_is_mounted; /* true if root is mounted */ struct vnode *opendisk(device_t); int getdisksize(struct vnode *, uint64_t *, unsigned int *); @@ -441,6 +442,7 @@ int config_fini_component(struct cfdrive void config_init_mi(void); void drvctl_init(void); void drvctl_fini(void); +extern int (*devmon_insert_vec)(const char *, prop_dictionary_t); int config_cfdriver_attach(struct cfdriver *); int config_cfdriver_detach(struct cfdriver *); Index: src/sys/sys/systm.h diff -u src/sys/sys/systm.h:1.277 src/sys/sys/systm.h:1.278 --- src/sys/sys/systm.h:1.277 Fri Aug 10 21:44:59 2018 +++ src/sys/sys/systm.h Tue Sep 18 01:25:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: systm.h,v 1.277 2018/08/10 21:44:59 pgoyette Exp $ */ +/* $NetBSD: systm.h,v 1.278 2018/09/18 01:25:09 mrg Exp $ */ /*- * Copyright (c) 1982, 1988, 1991, 1993 @@ -196,14 +196,14 @@ void aprint_naive(const char *, ...) __p void aprint_verbose(const char *, ...) __printflike(1, 2); void aprint_debug(const char *, ...) __printflike(1, 2); -void device_printf(device_t, const char *fmt, ...) __printflike(2, 3); - void aprint_normal_dev(device_t, const char *, ...) __printflike(2, 3); void aprint_error_dev(device_t, const char *, ...) __printflike(2, 3); void aprint_naive_dev(device_t, const char *, ...) __printflike(2, 3); void aprint_verbose_dev(device_t, const char *, ...) __printflike(2, 3); void aprint_debug_dev(device_t, const char *, ...) __printflike(2, 3); +void device_printf(device_t, const char *fmt, ...) __printflike(2, 3); + struct ifnet; void aprint_normal_ifnet(struct ifnet *, const char *, ...)