j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
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 =================================================================== --- forth/device/property.fs (révision 1257) +++ forth/device/property.fs (copie de travail) @@ -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 ===================================================================
On Sat, Feb 1, 2014 at 9:54 PM, Olivier Danet odanet@caramail.com wrote:
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.
Right. As discussed before, the current behavior matches the OBP behavior on sun4u machines.
It would be nice to keep the comatibility with OBP. Can the C function obp_nextprop(node,name) be modified instead?
Artyom
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
--- forth/device/property.fs (révision 1257) +++ forth/device/property.fs (copie de travail) @@ -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
===================================================================
-- OpenBIOS http://openbios.org/ Mailinglist: http://lists.openbios.org/mailman/listinfo Free your System - May the Forth be with you