Subject: Bug in ofdev.c of the ofwboot package?
To: None <port-macppc@netbsd.org>
From: =?ISO-8859-15?Q?Christian_M=FCller?= <cmue81@gmx.de>
List: port-macppc
Date: 11/01/2005 03:45:58
Please forgive me if I'm wrong (and please tell me in that case why it
does work the way it works).
Full listing:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/macppc/stand/ofwboot/ofdev.c?rev=1.15&content-type=text/x-cvsweb-markup
static char *
filename(char *str, char *ppart)
{
[...]
for (cp = str; *cp; lp = cp) {
/* For each component of the path name... */
while (*++cp && *cp != '/')
;
savec = *cp;
*cp = 0;
/* ...look whether there is a device with this name */
[NEXT LINE: SHOULD IT NOT BE cp INSTEAD OF str? Why else would you save cp in savec?]
dhandle = OF_finddevice(str);
*cp = savec;
[...]
}
return 0;
}