summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-05-09 08:58:45 +0000
committerphk <phk@FreeBSD.org>1999-05-09 08:58:45 +0000
commitbea63b9cdb6799073ba1479c2854e1f110857e96 (patch)
treea68d075c590fe43c3ef7a503a193d80a88c909ec /sys
parent2ed2581bdfdcedbe89555243ef72ce98610dbc23 (diff)
downloadFreeBSD-src-bea63b9cdb6799073ba1479c2854e1f110857e96.zip
FreeBSD-src-bea63b9cdb6799073ba1479c2854e1f110857e96.tar.gz
Don't confuse dev_t and major numbers in DEV_MODULE()
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/promcons.c4
-rw-r--r--sys/sys/conf.h10
-rw-r--r--sys/sys/linedisc.h10
-rw-r--r--sys/sys/param.h3
4 files changed, 14 insertions, 13 deletions
diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c
index a7c90d4..5570c7e 100644
--- a/sys/alpha/alpha/promcons.c
+++ b/sys/alpha/alpha/promcons.c
@@ -1,4 +1,4 @@
-/* $Id: promcons.c,v 1.5 1999/04/27 11:13:22 phk Exp $ */
+/* $Id: promcons.c,v 1.6 1999/05/07 10:09:28 phk Exp $ */
/* $NetBSD: promcons.c,v 1.13 1998/03/21 22:52:59 mycroft Exp $ */
/*
@@ -266,6 +266,6 @@ promdevtotty(dev)
return &prom_tty[0];
}
-DEV_MODULE(prom, CDEV_MAJOR, NODEV, prom_cdevsw, 0, 0);
+DEV_MODULE(prom, CDEV_MAJOR, NOMAJ, prom_cdevsw, 0, 0);
#endif /* _PMAP_MAY_USE_PROM_CONSOLE */
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 387fc9a..cd6e0aa 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)conf.h 8.5 (Berkeley) 1/9/95
- * $Id: conf.h,v 1.51 1999/05/07 10:11:23 phk Exp $
+ * $Id: conf.h,v 1.52 1999/05/08 06:40:12 phk Exp $
*/
#ifndef _SYS_CONF_H_
@@ -228,15 +228,15 @@ struct module;
struct devsw_module_data {
int (*chainevh)(struct module *, int, void *); /* next handler */
void *chainarg; /* arg for next event handler */
- int bdev; /* device major to use */
- int cdev; /* device major to use */
+ dev_t bdev; /* device major to use */
+ dev_t cdev; /* device major to use */
struct cdevsw *cdevsw; /* device functions */
};
#define DEV_MODULE(name, cmaj, bmaj, devsw, evh, arg) \
static struct devsw_module_data name##_devsw_mod = { \
- evh, arg, bmaj == NODEV ? NODEV : makedev(bmaj, 0), \
- cmaj == NODEV ? NODEV : makedev(cmaj, 0), &devsw \
+ evh, arg, bmaj == NOMAJ ? NODEV : makedev(bmaj, 0), \
+ cmaj == NOMAJ ? NODEV : makedev(cmaj, 0), &devsw \
}; \
\
static moduledata_t name##_mod = { \
diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h
index 387fc9a..cd6e0aa 100644
--- a/sys/sys/linedisc.h
+++ b/sys/sys/linedisc.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)conf.h 8.5 (Berkeley) 1/9/95
- * $Id: conf.h,v 1.51 1999/05/07 10:11:23 phk Exp $
+ * $Id: conf.h,v 1.52 1999/05/08 06:40:12 phk Exp $
*/
#ifndef _SYS_CONF_H_
@@ -228,15 +228,15 @@ struct module;
struct devsw_module_data {
int (*chainevh)(struct module *, int, void *); /* next handler */
void *chainarg; /* arg for next event handler */
- int bdev; /* device major to use */
- int cdev; /* device major to use */
+ dev_t bdev; /* device major to use */
+ dev_t cdev; /* device major to use */
struct cdevsw *cdevsw; /* device functions */
};
#define DEV_MODULE(name, cmaj, bmaj, devsw, evh, arg) \
static struct devsw_module_data name##_devsw_mod = { \
- evh, arg, bmaj == NODEV ? NODEV : makedev(bmaj, 0), \
- cmaj == NODEV ? NODEV : makedev(cmaj, 0), &devsw \
+ evh, arg, bmaj == NOMAJ ? NODEV : makedev(bmaj, 0), \
+ cmaj == NOMAJ ? NODEV : makedev(cmaj, 0), &devsw \
}; \
\
static moduledata_t name##_mod = { \
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 4cf6565..9148dce 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)param.h 8.3 (Berkeley) 4/4/95
- * $Id: param.h,v 1.44 1999/04/05 02:39:13 jdp Exp $
+ * $Id: param.h,v 1.45 1999/04/27 11:20:54 phk Exp $
*/
#ifndef _SYS_PARAM_H_
@@ -123,6 +123,7 @@
#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */
#define NODEV (dev_t)(-1) /* non-existent device */
+#define NOMAJ 256 /* non-existent device */
/*
* Clustering of hardware pages on machines with ridiculously small
OpenPOWER on IntegriCloud