Subject: I don't understand alpha/alpha/disksubr.c:178
To: None <port-alpha@netbsd.org>
From: Robert Elz <kre@munnari.OZ.AU>
List: port-alpha
Date: 03/04/2002 12:36:32
In arch/alpha/alpha/disksubr.c - in setdisklabel() the code around
line 178 is ...
if (nlp->d_magic != DISKMAGIC || nlp->d_magic2 != DISKMAGIC ||
dkcksum(nlp) != 0)
return (EINVAL);
while ((i = ffs((long)openmask)) != 0) {
i--;
openmask &= ~(1 << i);
if (nlp->d_npartitions <= i)
return (EBUSY);
The query is that "(long)" cast. Why? openmask is u_long, ffs takes
an int arg, according to libkern.h, what is going on there?
I suspect historical baggage that should be cleaned up - but if the alpha
does have an ffs() that takes a long, rather than an int, then something
probably needs to happen to libkern.h
kre