Re: major/minor split

H. Peter Anvin (hpa@zytor.com)
20 Mar 2003 15:52:18 -0800


Followup to: <UTC200303202224.h2KMOXC01107.aeb@smtp.cwi.nl>
By author: Andries.Brouwer@cwi.nl
In newsgroup: linux.dev.kernel
>
> For kdev_t (8,1) is 0x00080001 and (8,256) is 0x00080100.
> So kdev_t allows simple fast composition and decomposition,
> but is restricted to the kernel.
> While dev_t requires a conditional, since it has to remain
> compatible with the old 8+8 userspace.
>

I would suggest, instead:

typedef struct kdev {
u32 major, minor;
} kdev_t;

-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: 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/