Am Mittwoch, 13. Dezember 2006 12:51 schrieb Paul Alfille:
>
> How about separating the functions  as:
> "present" = 0 if no devices, "1" if more
> "single" = "" if 0 or >1, else name (ID)
> You can return other error codes, just not through FS_output_ascii_z
>
> I checked in a provisional "simultaneous/present" -- see if you like it.
>
Thanks for the simplifications, caching, and error handling you showed there.

I'm not entirely happy with separated nodes, as they involve reading twice and 
therefore, have both a performance hit *and* introduced a race condition. 
However, the "simultaneous/present" node is useful if someone wants to do a 
quick check prior to a scan ("uncached") of an usually unpopulated bus 
segment.

If I understand correctly it should be possible to return an error code from 
FS_output_ascii (without "_z"). I'll try this for the new "single" (really 
"single", not "id"?) node.

"single" = "" if 0, -EFAULT if >1, else name(id)

Kind regards

        Jan
-- 
ELIZA: You have a tendency to feel you are superior to most computers.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to