summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_conf.c16
-rw-r--r--sys/sys/types.h4
2 files changed, 12 insertions, 8 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index e6aa7389ca9a..15e1f4c093af 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.36 1999/05/09 13:00:46 phk Exp $
+ * $Id: kern_conf.c,v 1.37 1999/05/11 19:54:27 phk Exp $
*/
#include <sys/param.h>
@@ -179,26 +179,30 @@ devsw_module_handler(module_t mod, int what, void* arg)
int
major(dev_t x)
{
+ u_intptr_t i = (u_int)x;
+
#ifdef DEVT_FASCIST
- return(253 - ((x >> 8) & 0xff));
+ return(253 - ((i >> 8) & 0xff));
#else
- return((x >> 8) & 0xff);
+ return((i >> 8) & 0xff);
#endif
}
int
minor(dev_t x)
{
- return(x & 0xffff00ff);
+ u_intptr_t i = (u_int)x;
+
+ return(i & 0xffff00ff);
}
dev_t
makedev(int x, int y)
{
#ifdef DEVT_FASCIST
- return (((253 - x) << 8) | y);
+ return ((dev_t) (((253 - x) << 8) | y));
#else
- return ((x << 8) | y);
+ return ((dev_t) ((x << 8) | y));
#endif
}
diff --git a/sys/sys/types.h b/sys/sys/types.h
index 5e9f3be2c064..4243a1585bde 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)types.h 8.6 (Berkeley) 2/19/95
- * $Id: types.h,v 1.31 1999/05/11 19:55:00 phk Exp $
+ * $Id: types.h,v 1.32 1999/05/12 07:41:49 phk Exp $
*/
#ifndef _SYS_TYPES_H_
@@ -98,7 +98,7 @@ typedef struct vm_page *vm_page_t;
#ifdef KERNEL
typedef u_int32_t udev_t; /* device number */
-typedef u_int32_t dev_t;
+typedef void *dev_t;
#else /* !KERNEL */