Re: 32bit dev_t

H. Peter Anvin (hpa@zytor.com)
3 Feb 2003 10:21:19 -0800


Followup to: <UTC200301242204.h0OM4jU09451.aeb@smtp.cwi.nl>
By author: Andries.Brouwer@cwi.nl
In newsgroup: linux.dev.kernel
>
> The main point to decide would be the external dev_t format.
> Of course the format must be compatible with existing filesystems
> and binaries. For example,
>
> #define MAJOR(dev) ((unsigned int)(((dev) & 0xffff0000) \
> ? ((dev) >> 16) & 0xffff : ((dev) >> 8) & 0xff))
> #define MINOR(dev) ((unsigned int)(((dev) & 0xffff0000) \
> ? ((dev) & 0xffff) : ((dev) & 0xff)))
> #define MKDEV(ma,mi) ((dev_t)((((ma) & ~0xff) == 0 && ((mi) & ~0xff) == 0) \
> ? (((ma) << 8) | (mi)) : (((ma) << 16) | (mi))))
>
> This is 1-1 on nonzero majors (and zero major, 8-bit minor).
>

I thought we had already decided:

12 bits major : 20 bits minor

The zero major is used for dev_t compatibility, of course.

I personally still prefer 32:32, but I got voted down.

-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: cris ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/