diff options
author | dg <dg@FreeBSD.org> | 1994-09-25 15:56:25 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-09-25 15:56:25 +0000 |
commit | 58356f67d6bba46c965806677d8cbd9dbee2d1c5 (patch) | |
tree | a64198a4b9ab8ad8e365df0b6eb50ca8a0f13706 /sys | |
parent | 07047bb4ea7574f7fdb3540d77fdbd339a7a2412 (diff) | |
download | FreeBSD-src-58356f67d6bba46c965806677d8cbd9dbee2d1c5.zip FreeBSD-src-58356f67d6bba46c965806677d8cbd9dbee2d1c5.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/types.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/sys/types.h b/sys/sys/types.h index 1d3535e..1a4e48b 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 |