> Quoth Gary Mills on Thu, Mar 26, 2009 at 05:52:50PM > -0700: > > I've done a review of the return codes from these > functions, based on the code and the man > > pages. Although it's not exhaustive, I can see > already that in unusual circumstances they > > can return codes that are not documented in their > man pages. The caller will always have > > to be written to handle the ones that it can > handle, and to issue an error message for anything > > else. Is this the normal situation, or should it > be documented in the man pages? > > All error codes should be documented.
I agree. I've certainly seen problems arise when library functions or system calls return unexpected error codes. In this case, the full list of return codes appears in scf_error(3SCF). In my review, I can't rule any of them out for being returned from the mid-level functions in unusual circumstances. However, the logic of these functions suggests a much smaller set of outcomes. Some return codes in the full set don't make sense for these functions. Aggregating SCF_ERROR_DELETED with SCF_ERROR_NOT_FOUND makes sense in that context. I'm certainly willing to write the code for that change, as a way to get started as a contributer. -- This message posted from opensolaris.org