Date: Sun, 4 Jul 2010 02:42:01 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r209680 - user/nwhitehorn/ps3/dev/ofw Message-ID: <201007040242.o642g1YH098823@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Sun Jul 4 02:42:01 2010 New Revision: 209680 URL: http://svn.freebsd.org/changeset/base/209680 Log: OF modules should return phandles equal to -1 on error, not 0. FDT should be audited for this more thoroughly, but this keeps Powermac-related stuff from thinking it should attach for now. Modified: user/nwhitehorn/ps3/dev/ofw/ofw_fdt.c Modified: user/nwhitehorn/ps3/dev/ofw/ofw_fdt.c ============================================================================== --- user/nwhitehorn/ps3/dev/ofw/ofw_fdt.c Sun Jul 4 02:40:31 2010 (r209679) +++ user/nwhitehorn/ps3/dev/ofw/ofw_fdt.c Sun Jul 4 02:42:01 2010 (r209680) @@ -387,6 +387,8 @@ ofw_fdt_finddevice(ofw_t ofw, const char offset = fdt_path_offset(fdtp, device); p = (phandle_t)(uintptr_t)fdt_offset_ptr(fdtp, offset, sizeof(p)); + if (p == 0) + p = -1; return (p); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007040242.o642g1YH098823>