summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-06-23 19:43:54 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-06-23 19:43:54 +0000
commit65f285480cfb8ffdde7cfc949f935d1e91911803 (patch)
tree2edfc96a7b4900240d54d1e86e1ed12b819ab2ba /sys
parentb815a7fcabf2f223acd3bf86b1f8b5c95cf09f15 (diff)
Move to 24 bit minor numbers in a backwards compatible manner.
dev_t has been 32 bits for a long long time, now we can use those bits.
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/types.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/types.h b/sys/sys/types.h
index 76d1d143d5a..dd11d45122e 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.16 2000/02/22 17:29:12 millert Exp $ */
+/* $OpenBSD: types.h,v 1.17 2001/06/23 19:43:53 millert Exp $ */
/* $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ */
/*-
@@ -149,8 +149,8 @@ __END_DECLS
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
/* Major, minor numbers, dev_t's. */
#define major(x) ((int32_t)(((u_int32_t)(x) >> 8) & 0xff))
-#define minor(x) ((int32_t)((x) & 0xff))
-#define makedev(x,y) ((dev_t)(((x) << 8) | (y)))
+#define minor(x) ((int32_t)((x) & 0xff) | (((x) & 0xffff0000) >> 8))
+#define makedev(x,y) ((dev_t)((((x) & 0xff) << 8) | ((y) & 0xff) | (((y) & 0xffff00) << 8)))
#endif
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)