return value of prop_*_recv_syscall()

Francois Tigeot ftigeot at
Sat Sep 24 23:49:48 PDT 2011


[ This is a repost of a mail I've sent to tech-kern at,
I forgot to Cc: kernel@ ]

While learning how to use proplib, I've found an inconsistency between the
documentation and the actual kernel implementations:

the manual page for prop_array_send_syscall, prop_array_recv_syscall,
prop_dictionary_send_syscall and prop_dictionary_recv_syscall says these
functions return true if successful

The kernel implementations are different for prop_array_recv_syscall() and
prop_dictionary_recv_syscall, they return 0 if there's no error:

Since DragonFly's proplib implementation comes from NetBSD, I figured it
would be best to ask here what to do:
fix the documentation or fix the implementation ?

Just replacing 
        return (_prop_object_internalize_from_pref(blah));
        return (_prop_object_internalize_from_pref(blah) == 0);

in prop_kern.c should be enough to fix it, but I'm not sure if
this is the better idea in the long run ...

Francois Tigeot

More information about the Kernel mailing list