diff options
author | phk <phk@FreeBSD.org> | 1999-08-08 18:43:05 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-08-08 18:43:05 +0000 |
commit | e938d317d57f5bdbcd03330bb1290da29802187d (patch) | |
tree | 3c9ed3dde7ffaca65d359ae0e230b6e3e4e6f8ca /sys/kern | |
parent | 909603ec05eff128d9bdd1107a650a817c460e20 (diff) | |
download | FreeBSD-src-e938d317d57f5bdbcd03330bb1290da29802187d.zip FreeBSD-src-e938d317d57f5bdbcd03330bb1290da29802187d.tar.gz |
Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,
a few lines into <sys/vnode.h>.
Add a few fields to struct specinfo, paving the way for the fun part.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_conf.c | 25 | ||||
-rw-r--r-- | sys/kern/kern_mib.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_aio.c | 3 | ||||
-rw-r--r-- | sys/kern/vfs_bio.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_export.c | 6 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 6 |
6 files changed, 31 insertions, 17 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index b944149..0a20262 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_conf.c,v 1.53 1999/07/20 21:51:12 green Exp $ + * $Id: kern_conf.c,v 1.54 1999/08/08 00:34:00 grog Exp $ */ #include <sys/param.h> @@ -41,8 +41,7 @@ #include <sys/conf.h> #include <sys/vnode.h> #include <sys/queue.h> - -#include <miscfs/specfs/specdev.h> +#include <machine/stdarg.h> #define cdevsw_ALLOCSTART (NUMCDEVSW/2) @@ -230,6 +229,10 @@ makedev(int x, int y) si->si_bsize_phys = DEV_BSIZE; si->si_bsize_best = BLKDEV_IOSIZE; si->si_bsize_max = MAXBSIZE; + if (y > 256) + sprintf(si->si_name, "#%d/0x%x", x, y); + else + sprintf(si->si_name, "#%d/%d", x, y); SLIST_INSERT_HEAD(&dev_hash[hash], si, si_hash); return (si); } @@ -283,3 +286,19 @@ makeudev(int x, int y) return ((x << 8) | y); } +dev_t +make_dev(struct cdevsw *devsw, int minor, uid_t uid, gid_t gid, int perms, char *fmt, ...) +{ + dev_t dev; + va_list ap; + int i; + + dev = makedev(devsw->d_maj, minor); + va_start(ap, fmt); + i = kvprintf(fmt, NULL, dev->si_name, 32, ap); + dev->si_name[i] = '\0'; + va_end(ap); + dev->si_devsw = devsw; + return (dev); +} + diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index f6ada02..d9e9250 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 - * $Id: kern_mib.c,v 1.21 1999/07/19 09:13:12 phk Exp $ + * $Id: kern_mib.c,v 1.22 1999/07/20 07:19:32 phk Exp $ */ #include <sys/param.h> @@ -246,6 +246,6 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, vnode, CTLFLAG_RD, SYSCTL_INT(_debug_sizeof, OID_AUTO, proc, CTLFLAG_RD, 0, sizeof(struct proc), "sizeof(struct proc)"); -#include <miscfs/specfs/specdev.h> +#include <sys/conf.h> SYSCTL_INT(_debug_sizeof, OID_AUTO, specinfo, CTLFLAG_RD, 0, sizeof(struct specinfo), "sizeof(struct specinfo)"); diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 4c2132d..266f97f 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -13,7 +13,7 @@ * bad that happens because of using this software isn't the responsibility * of the author. This software is distributed AS-IS. * - * $Id: vfs_aio.c,v 1.53 1999/06/30 15:33:36 peter Exp $ + * $Id: vfs_aio.c,v 1.54 1999/07/01 13:21:40 peter Exp $ */ /* @@ -36,7 +36,6 @@ #include <sys/sysctl.h> #include <sys/vnode.h> #include <sys/conf.h> -#include <miscfs/specfs/specdev.h> #include <vm/vm.h> #include <vm/vm_param.h> diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index d3a668e..83a55b9 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -11,7 +11,7 @@ * 2. Absolutely no warranty of function or purpose is made by the author * John S. Dyson. * - * $Id: vfs_bio.c,v 1.223 1999/07/09 16:41:19 peter Exp $ + * $Id: vfs_bio.c,v 1.224 1999/07/26 06:25:16 alc Exp $ */ /* @@ -38,7 +38,6 @@ #include <sys/vnode.h> #include <sys/vmmeter.h> #include <sys/lock.h> -#include <miscfs/specfs/specdev.h> #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/vm_prot.h> @@ -52,6 +51,7 @@ #include <sys/mount.h> #include <sys/malloc.h> #include <sys/resourcevar.h> +#include <sys/conf.h> static MALLOC_DEFINE(M_BIOBUF, "BIO buffer", "BIO buffer"); diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 53069af..0a711d0 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.213 1999/07/20 09:47:44 phk Exp $ + * $Id: vfs_subr.c,v 1.214 1999/07/26 06:25:17 alc Exp $ */ /* @@ -46,7 +46,6 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/conf.h> #include <sys/fcntl.h> #include <sys/kernel.h> #include <sys/proc.h> @@ -60,6 +59,7 @@ #include <sys/domain.h> #include <sys/dirent.h> #include <sys/vmmeter.h> +#include <sys/conf.h> #include <machine/limits.h> @@ -76,8 +76,6 @@ #include <vm/vm_zone.h> #include <sys/sysctl.h> -#include <miscfs/specfs/specdev.h> - static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure"); static struct vnode *checkalias2 __P((struct vnode *nvp, dev_t dev, struct mount *mp)); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 53069af..0a711d0 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.213 1999/07/20 09:47:44 phk Exp $ + * $Id: vfs_subr.c,v 1.214 1999/07/26 06:25:17 alc Exp $ */ /* @@ -46,7 +46,6 @@ #include <sys/param.h> #include <sys/systm.h> -#include <sys/conf.h> #include <sys/fcntl.h> #include <sys/kernel.h> #include <sys/proc.h> @@ -60,6 +59,7 @@ #include <sys/domain.h> #include <sys/dirent.h> #include <sys/vmmeter.h> +#include <sys/conf.h> #include <machine/limits.h> @@ -76,8 +76,6 @@ #include <vm/vm_zone.h> #include <sys/sysctl.h> -#include <miscfs/specfs/specdev.h> - static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure"); static struct vnode *checkalias2 __P((struct vnode *nvp, dev_t dev, struct mount *mp)); |