On 03/01/14 19:16, Olivier Danet wrote:
Hi Olivier,
You are right. I tried on an Ultra 10 with OpenBoot 3.12.
next-property returns nothing when the property is unknown and also when the property is the last one. This contradicts Sun own documentation "Writing FCode 3.x Programs".
Hmmmm. Is there anything in the IEEE1275 errata about this?
Puzzled, I tried then on a Apple iBook G3 : dev screen " <something>" active-package next-property
This laptop returns :
- true and a forth string when the property is not the last one
- true and "0 0" when the property is the last one
- false when the property does not exist.
Anyway, whatever method is chosen (return nothing, return zero...), OpenBIOS forth and/or C code ("opb_nextprop()") should be modifed to avoid page faults.
Yes indeed. The OpenBIOS Forth string to C string implementation returns NULL if the length is 0 which has caught me out a few times. The trick I've done, particularly in the filesystem drivers, is to do something like the following where required:
if (str == NULL) { return ""; }
BTW you never answered about which version of NetBSD you were trying to boot?
ATB,
Mark.