On Tue, Apr 19, 2011 at 01:15:11AM +0200, Ingo Schwarze wrote: > Hi Matthew and Joachim, > > Matthew Dempsky wrote on Mon, Apr 18, 2011 at 11:34:50AM -0700: > > > The issue here (if any) is that we over-specify the *successful* > > return value as precisely 0, rather than generally non-negative. > > I like the general idea, so i'd suggest the following. > Note that the exact wording has been chosen to be as close > to the output of the .Rv macro as possible. > > In case we go into that direction, i suspect that some other > manuals might contain similar overspecifications. > > Yours, > Ingo > > > Index: uname.3 > =================================================================== > RCS file: /cvs/src/lib/libc/gen/uname.3,v > retrieving revision 1.12 > diff -u -r1.12 uname.3 > --- uname.3 31 May 2007 19:19:29 -0000 1.12 > +++ uname.3 18 Apr 2011 23:05:00 -0000 > @@ -63,11 +63,14 @@ > Machine hardware platform. > .El > .Sh RETURN VALUES > -If > +The > .Fn uname > -is successful, 0 is returned; otherwise, \-1 is returned and > +function returns a non-negative value (on > +.Ox , > +always 0) if successful; otherwise the value -1 is returned > +and the global variable > .Va errno > -is set appropriately. > +is set to indicate the error. > .Sh ERRORS > The > .Fn uname >
Why not just use the POSIX statement replacing 'shall' with 'is'? "Upon successful completion, a non-negative value is returned. Otherwise, -1 is returned and errno is set to indicate the error." Why create hostages to fortune by being over-specific? .... Ken
