j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: mcayland Date: Wed Mar 5 01:04:32 2014 New Revision: 1272 URL: http://tracker.coreboot.org/trac/openbios/changeset/1272
Log: property.fs: fix next-property return when requesting non-existent property
obp_nextprop(node,name) calls the Forth word "next-property" then pops the result. "next-property" should therefore always return something:
* A string when the property provided is not the last one of the node. * Zero when the property provided is the last one of the node. * Zero when the property provided does not exist in the current node.
Previously, next-property returned nothing when the property didn't exist.
"next-property" behavior with last and nonexistant properties differs between implementations of OF.
This problem was found with NetBSD on Sparc32. It ennumerates peripherals when starting X11 and asks for the "name" and "device_type" property of many nodes, including some which have neither "name" nor "device_type" properties.
Signed-off-by: Olivier Danet odanet@caramail.com Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/forth/device/property.fs
Modified: trunk/openbios-devel/forth/device/property.fs ============================================================================== --- trunk/openbios-devel/forth/device/property.fs Mon Mar 3 18:00:20 2014 (r1271) +++ trunk/openbios-devel/forth/device/property.fs Wed Mar 5 01:04:32 2014 (r1272) @@ -70,7 +70,7 @@ 2drop r> >dn.properties @ else r> find-property dup if @ then - ?dup if >prop.next @ then + dup if >prop.next @ then then
?dup if