diff options
Diffstat (limited to 'man2/readlink.2')
-rw-r--r-- | man2/readlink.2 | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/man2/readlink.2 b/man2/readlink.2 index fe2369d..c476091 100644 --- a/man2/readlink.2 +++ b/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 2023-11-01 "Linux man-pages 6.7" .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,7 +253,7 @@ 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> @@ -307,7 +307,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 |