summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2021-03-16 23:38:58 +0000
committerAndy Fiddaman <omnios@citrus-it.co.uk>2021-03-16 23:45:24 +0000
commit6edc7986d8c0034d072afac8b25477b983bf8f55 (patch)
treed7b0784547d56298c96e3bd23edf396670e2c262 /usr
parentd6f391ef39bc41c64e16ac5d7b10c1c8d5b1761e (diff)
downloadillumos-joyent-6edc7986d8c0034d072afac8b25477b983bf8f55.tar.gz
13586 getcwd() should accept a 0 length argument (fix mandoc)
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr')
-rw-r--r--usr/src/man/man3c/getcwd.3c56
1 files changed, 28 insertions, 28 deletions
diff --git a/usr/src/man/man3c/getcwd.3c b/usr/src/man/man3c/getcwd.3c
index 045bfafa67..ba27b7f9bb 100644
--- a/usr/src/man/man3c/getcwd.3c
+++ b/usr/src/man/man3c/getcwd.3c
@@ -123,34 +123,6 @@ Otherwise,
is returned and
.Va errno
is set to indicate the error.
-.Sh ERRORS
-The
-.Fn getcwd
-function will fail if:
-.Bl -tag -width Er
-.It Er EFAULT
-The
-.Fa buf
-argument points to an invalid address.
-.It Er EINVAL
-The
-.Fa buf
-argument is not
-.Dv NULL
-and the
-.Fa size
-argument is 0.
-.It Er ERANGE
-The pathname
-.Pq including its terminating nul character
-is too long to fit into the provided
-.Pq or allocated
-buffer.
-.It Er EACCESS
-A parent directory cannot be read to get its name.
-.It Er ENOMEM
-Insufficient storage space is available.
-.El
.Sh EXAMPLES
.Sy Example 1
Determine the absolute pathname of the current working directory.
@@ -197,6 +169,34 @@ main(void)
return(0);
}
.Ed
+.Sh ERRORS
+The
+.Fn getcwd
+function will fail if:
+.Bl -tag -width Er
+.It Er EFAULT
+The
+.Fa buf
+argument points to an invalid address.
+.It Er EINVAL
+The
+.Fa buf
+argument is not
+.Dv NULL
+and the
+.Fa size
+argument is 0.
+.It Er ERANGE
+The pathname
+.Pq including its terminating nul character
+is too long to fit into the provided
+.Pq or allocated
+buffer.
+.It Er EACCESS
+A parent directory cannot be read to get its name.
+.It Er ENOMEM
+Insufficient storage space is available.
+.El
.Sh USAGE
Applications should exercise care when using
.Xr chdir 2