From 58356f67d6bba46c965806677d8cbd9dbee2d1c5 Mon Sep 17 00:00:00 2001 From: dg Date: Sun, 25 Sep 1994 15:56:25 +0000 Subject: [PATCH] Extended minor number to include bits 16-31. It was done this way rather than making it 16bit and extending the major to 16bit because doing that would have caused problems with existing filesystems /dev entries. This change should have no apparant side effects. This change is needed for the DOS partition re-work and other things. Submitted by: Bruce Evans --- sys/sys/types.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/sys/types.h b/sys/sys/types.h index 1d3535e94929..1a4e48b97db2 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)types.h 8.4 (Berkeley) 1/21/94 - * $Id: types.h,v 1.2 1994/08/02 07:53:59 davidg Exp $ + * $Id: types.h,v 1.3 1994/09/16 11:44:45 paul Exp $ */ #ifndef _SYS_TYPES_H_ @@ -86,8 +86,13 @@ __END_DECLS #endif #ifndef _POSIX_SOURCE +/* + * minor() gives a cookie instead of an index since we don't want to + * change the meanings of bits 0-15 or waste time and space shifting + * bits 16-31 for devices that don't use them. + */ #define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */ -#define minor(x) ((int)((x)&0xff)) /* minor number */ +#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */ #define makedev(x,y) ((dev_t)(((x)<<8) | (y))) /* create dev_t */ #endif