summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/if_cx.c
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/i386/isa/if_cx.c
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/i386/isa/if_cx.c')
-rw-r--r--sys/i386/isa/if_cx.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/i386/isa/if_cx.c b/sys/i386/isa/if_cx.c
index 1520f95..8ea6810 100644
--- a/sys/i386/isa/if_cx.c
+++ b/sys/i386/isa/if_cx.c
@@ -45,9 +45,9 @@
# include <machine/pio.h>
# else
# ifdef DEVFS
+extern struct cdevsw cx_cdevsw;
# include <sys/devfsext.h>
# endif /*DEVFS*/
-# define CDEV_MAJOR 42 /*XXX*/ /* replace with variable ASAP*/
# include <sys/devconf.h>
# endif
# define watchdog_func_t void(*)(struct ifnet *)
@@ -372,11 +372,10 @@ void cxattach (struct device *parent, struct device *self, void *aux)
printf ("cx%d: <Cronyx-%s>\n", unit, b->name);
#ifdef DEVFS
{
- int x;
-/* default for a simple device with no probe routine (usually delete this) */
+ void *x;
x=devfs_add_devsw(
/* path name devsw minor type uid gid perm*/
- "/", "cx", major(CDEV_MAJOR), 0, DV_CHR, 0, 0, 0600);
+ "/", "cx", &cx_cdevsw, 0, DV_CHR, 0, 0, 0600);
}
#endif
return (1);
OpenPOWER on IntegriCloud