summaryrefslogtreecommitdiffstats
path: root/sys/sys/conf.h
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1995-12-08 11:19:42 +0000
committerjulian <julian@FreeBSD.org>1995-12-08 11:19:42 +0000
commit1900eea896e2aaeae8a9fa8affa5fded2068c9b4 (patch)
tree5150d199464d64c1021f91b2c2f112d48546a8bf /sys/sys/conf.h
parentaaf9d7f10ecc63adae1dc4f55cfd31a2926c605a (diff)
downloadFreeBSD-src-1900eea896e2aaeae8a9fa8affa5fded2068c9b4.zip
FreeBSD-src-1900eea896e2aaeae8a9fa8affa5fded2068c9b4.tar.gz
Pass 3 of the great devsw changes
most devsw referenced functions are now static, as they are in the same file as their devsw structure. I've also added DEVFS support for nearly every device in the system, however many of the devices have 'incorrect' names under DEVFS because I couldn't quickly work out the correct naming conventions. (but devfs won't be coming on line for a month or so anyhow so that doesn't matter) If you "OWN" a device which would normally have an entry in /dev then search for the devfs_add_devsw() entries and munge to make them right.. check out similar devices to see what I might have done in them in you can't see what's going on.. for a laugh compare conf.c conf.h defore and after... :) I have not doen DEVFS entries for any DISKSLICE devices yet as that will be a much more complicated job.. (pass 5 :) pass 4 will be to make the devsw tables of type (cdevsw * ) rather than (cdevsw) seems to work here.. complaints to the usual places.. :)
Diffstat (limited to 'sys/sys/conf.h')
-rw-r--r--sys/sys/conf.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 1fc0c04..d29f7e0 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)conf.h 8.3 (Berkeley) 1/21/94
- * $Id: conf.h,v 1.23 1995/11/29 14:41:17 julian Exp $
+ * $Id: conf.h,v 1.24 1995/12/05 19:53:14 bde Exp $
*/
#ifndef _SYS_CONF_H_
@@ -58,6 +58,7 @@ typedef int d_close_t __P((dev_t, int, int, struct proc *));
typedef int d_ioctl_t __P((dev_t, int, caddr_t, int, struct proc *));
typedef int d_dump_t __P((dev_t));
typedef int d_psize_t __P((dev_t));
+typedef int d_size_t __P((dev_t));
typedef int d_read_t __P((dev_t, struct uio *, int));
typedef int d_write_t __P((dev_t, struct uio *, int));
@@ -87,6 +88,9 @@ struct bdevsw {
d_dump_t *d_dump;
d_psize_t *d_psize;
int d_flags;
+ char *d_name; /* name of the driver e.g. audio */
+ struct cdevsw *d_cdev; /* cross pointer to the cdev */
+ int d_maj; /* the major number we were assigned */
};
#ifdef KERNEL
@@ -105,6 +109,9 @@ struct cdevsw {
d_select_t *d_select;
d_mmap_t *d_mmap;
d_strategy_t *d_strategy;
+ char *d_name;
+ struct bdevsw *d_bdev; /* cross pointer to the bdev */
+ int d_maj; /* the major number we were assigned */
};
#ifdef KERNEL
@@ -153,12 +160,10 @@ d_devtotty_t nodevtotty;
d_select_t noselect;
d_mmap_t nommap;
-#ifdef JREMOD
/* Bogus defines for compatibility. */
#define noioc noioctl
#define nostrat nostrategy
#define zerosize nopsize
-#endif /*JREMOD*/
/*
* XXX d_strategy seems to be unused for cdevs that aren't associated with
* bdevs and called without checking for it being non-NULL for bdevs.
@@ -197,10 +202,8 @@ d_rdwr_t rawwrite;
l_read_t l_noread;
l_write_t l_nowrite;
-#ifdef JREMOD
int bdevsw_add __P((dev_t *descrip,struct bdevsw *new,struct bdevsw *old));
int cdevsw_add __P((dev_t *descrip,struct cdevsw *new,struct cdevsw *old));
-#endif
dev_t chrtoblk __P((dev_t dev));
int getmajorbyname __P((const char *name));
int isdisk __P((dev_t dev, int type));
OpenPOWER on IntegriCloud