[klibc] [PATCH] kinit
volker at ixolution.de
Wed Mar 10 08:53:30 PST 2004
On Tue, Mar 09, 2004 at 08:26:15PM -0800,
H. Peter Anvin <hpa at zytor.com> wrote:
> Volker Dormeyer wrote:
> > /* if partition is within range - we got it */
> > if (part < range)
> >- return res + part;
> >+ return (res << 8) + part;
> This seems very wrong...
try_name () determined "part" with minor 3 and "res" contained major 3.
Now, try_name () returned "6" and mknod () created /dev/root with
major 0 and minor 6. I did a left shift of 8 bits, to give mknod () an
appropriate 16 bit value of type dev_t.
Hmm, I was not sure here. Does it break other setups? I thought this could
be a problem in other setups, too.
More information about the klibc