[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XenPPC] [PATCH] Warn instead of fail on device_type fetch fail



The latest release of SLOF is missing mandatory "device_type" nodes for
both ISA and system-controller (which are both busses).  Until this is
fixed, Xen fails to boot on that release of SLOF. So work around it by
just printing a warning instead of a panic.



         rc = of_getprop(p, "device_type", type, sizeof (type));
         if (rc == OF_FAILURE)
-            of_panic("fetching device type failed\n");
+ of_printf("%s: fetching type of %s failed\n", __func__, buf);

         if (strcmp(type, "serial") != 0)
             continue;

You should either break out, or invalidate the "type" string, because
you will get false hits this way if you're not lucky (getprop will
not write its argument if it cannot find the property).


Segher


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.