summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-tumbleweed/man2/readlink.2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:51:52 +0000
commit4ad94864781f48b1a4b77f9cfb934622bf756ba1 (patch)
tree3900955c1886e6d2570fea7125ee1f01bafe876d /upstream/opensuse-tumbleweed/man2/readlink.2
parentAdding upstream version 4.22.0. (diff)
downloadmanpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.tar.xz
manpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.zip
Adding upstream version 4.23.0.upstream/4.23.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/opensuse-tumbleweed/man2/readlink.2')
-rw-r--r--upstream/opensuse-tumbleweed/man2/readlink.231
1 files changed, 16 insertions, 15 deletions
diff --git a/upstream/opensuse-tumbleweed/man2/readlink.2 b/upstream/opensuse-tumbleweed/man2/readlink.2
index fe2369d2..12bf43b0 100644
--- a/upstream/opensuse-tumbleweed/man2/readlink.2
+++ b/upstream/opensuse-tumbleweed/man2/readlink.2
@@ -13,7 +13,7 @@
.\" 2011-09-20, Guillem Jover <guillem@hadrons.org>:
.\" Added text on dynamically allocating buffer + example program
.\"
-.TH readlink 2 2023-05-03 "Linux man-pages 6.05.01"
+.TH readlink 2 2024-05-02 "Linux man-pages (unreleased)"
.SH NAME
readlink, readlinkat \- read value of a symbolic link
.SH LIBRARY
@@ -22,29 +22,29 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <unistd.h>
-.PP
+.P
.BI "ssize_t readlink(const char *restrict " pathname ", char *restrict " buf ,
.BI " size_t " bufsiz );
-.PP
+.P
.BR "#include <fcntl.h> " "/* Definition of " AT_* " constants */"
.B #include <unistd.h>
-.PP
+.P
.BI "ssize_t readlinkat(int " dirfd ", const char *restrict " pathname ,
.BI " char *restrict " buf ", size_t " bufsiz );
-.PP
+.P
.fi
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR readlink ():
.nf
_XOPEN_SOURCE >= 500 || _POSIX_C_SOURCE >= 200112L
.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
|| /* glibc <= 2.19: */ _BSD_SOURCE
.fi
-.PP
+.P
.BR readlinkat ():
.nf
Since glibc 2.10:
@@ -72,7 +72,7 @@ The
system call operates in exactly the same way as
.BR readlink (),
except for the differences described here.
-.PP
+.P
If the pathname given in
.I pathname
is relative, then it is interpreted relative to the directory
@@ -82,7 +82,7 @@ referred to by the file descriptor
the calling process, as is done by
.BR readlink ()
for a relative pathname).
-.PP
+.P
If
.I pathname
is relative and
@@ -94,13 +94,13 @@ then
is interpreted relative to the current working
directory of the calling process (like
.BR readlink ()).
-.PP
+.P
If
.I pathname
is absolute, then
.I dirfd
is ignored.
-.PP
+.P
Since Linux 2.6.39,
.\" commit 65cfc6722361570bfe255698d9cd4dccaf47570d
.I pathname
@@ -114,7 +114,7 @@ with the
and
.B O_NOFOLLOW
flags).
-.PP
+.P
See
.BR openat (2)
for an explanation of the need for
@@ -199,7 +199,7 @@ POSIX.1-2001, POSIX.1-2008.
POSIX.1-2008.
Linux 2.6.16,
glibc 2.4.
-.PP
+.P
Up to and including glibc 2.4, the return type of
.BR readlink ()
was declared as
@@ -253,13 +253,14 @@ falling back to a buffer of size
in cases where
.BR lstat (2)
reports a size of zero.
-.PP
+.P
.\" SRC BEGIN (readlink.c)
.EX
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <unistd.h>
\&
int
@@ -307,7 +308,7 @@ main(int argc, char *argv[])
null byte (\[aq]\e0\[aq]). */
printf("\[aq]%s\[aq] points to \[aq]%.*s\[aq]\en", argv[1], (int) nbytes, buf);
\&
- /* If the return value was equal to the buffer size, then the
+ /* If the return value was equal to the buffer size, then
the link target was larger than expected (perhaps because the
target was changed between the call to lstat() and the call to
readlink()). Warn the user that the returned target may have