From 65f285480cfb8ffdde7cfc949f935d1e91911803 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 23 Jun 2001 19:43:54 +0000 Subject: 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. --- sys/sys/types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') 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) -- cgit v1.2.3