Subject: port-macppc/31972: typo in netbsd/macppc ofwboot.c
To: None <,,>
From: None <>
List: netbsd-bugs
Date: 11/01/2005 18:53:00
>Number:         31972
>Category:       port-macppc
>Synopsis:       typo in netbsd/macppc ofwboot.c
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-macppc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 01 18:53:00 +0000 2005
>Originator:     Christian Müller
>Release:        2.0.2
don't need this, bug is at a point where there is no (kernel) environment yet - in the boot code
Full listing:

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;

Boot on an oldworld powermac machine and let ofwboot ask you for the kernel to load - when using a device in the OF-path you supply it will only work when the (block) device is on root of the openfirmware path.  The bug is obvious, you can see that it was intended different, just a typo...
see full description, also posted this to ports/macppc mailing list