From: Michael Kerrisk Date: Sun, 18 Jun 2017 09:15:34 +0000 (+0200) Subject: fpathconf.3: Rework RETURN VALUE description to add more detail X-Git-Tag: man-pages-4.12~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=081a3c719b9e0957529837ad94e40adb890a2e2e;p=thirdparty%2Fman-pages.git fpathconf.3: Rework RETURN VALUE description to add more detail Signed-off-by: Michael Kerrisk --- diff --git a/man3/fpathconf.3 b/man3/fpathconf.3 index 2a7b37de7b..b95006cb38 100644 --- a/man3/fpathconf.3 +++ b/man3/fpathconf.3 @@ -158,14 +158,43 @@ or .I path must refer to a terminal. .SH RETURN VALUE -The limit is returned, if one exists. -If the system does not have a -limit for the requested resource, \-1 is returned, and +The return value of these functions is one of the following: +.IP * 3 +On error, \-1 is returned and .I errno -is unchanged. -If there is an error, \-1 is returned, and +is set to indicate the cause of the error +(for example, +.BR EINVAL , +indicating that +.I name +is invalid). +.IP * +If +.I name +corresponds to a maximum or minimum limit, and that limit is indeterminate, +\-1 is returned and +.I errno +is not changed. +(To distinguish an indeterminate limit from an error, set +.I errno +to zero before the call, and then check whether .I errno -is set to reflect the nature of the error. +is nonzero when \-1 is returned.) +.IP * +If +.I name +corresponds to an option, +a positive value is returned if the option is supported, +and \-1 is returned if the option is not supported. +.IP * +Otherwise, +the current value of the option or limit is returned. +This value will not be more restrictive than +the corresponding value that was described to the application in +.I +or +.I +when the application was compiled. .SH ATTRIBUTES For an explanation of the terms used in this section, see .BR attributes (7).