From ef1bbd620974e8c277a18f894c9b7c83396e3f82 Mon Sep 17 00:00:00 2001 From: Felix von Leitner Date: Thu, 14 Jul 2016 16:47:05 +0000 Subject: [PATCH] use AT_FDCWD instead of -1 --- mmap/mmap_readat.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mmap/mmap_readat.3 b/mmap/mmap_readat.3 index de48a9f..353f550 100644 --- a/mmap/mmap_readat.3 +++ b/mmap/mmap_readat.3 @@ -10,7 +10,8 @@ mmap_readat opens \fIfilename\fR for reading, maps the whole file into memory, closes the file, writes the length of the file to \fIfilesize\fR and returns a pointer to the mapped file. -If \fIfilename\fR is a relative path and \fIdirfd\fR is not -1, +If \fIfilename\fR is a relative path and \fIdirfd\fR is not AT_FDCWD +(defined in fcntl.h), \fIfilename\fR is interpreted relative to \fIdirfd\fR, which must be an open directory.