aboutsummaryrefslogtreecommitdiffstats
path: root/man2/open.2
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2014-01-22 03:50:36 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2014-01-24 11:44:57 +0100
commite1252130e0e94d960375f3f45d20b5d45cf3ca34 (patch)
treeec4edfea4d8fb9533e6031e13d0abecabc6d9e6e /man2/open.2
parent4d61d36a8ed92521c7aef81a8f31a3699672aac3 (diff)
downloadman-pages-e1252130e0e94d960375f3f45d20b5d45cf3ca34.tar.gz
open.2: Adjust O_TMPFILE code sample
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man2/open.2')
-rw-r--r--man2/open.22
1 files changed, 1 insertions, 1 deletions
diff --git a/man2/open.2 b/man2/open.2
index a6856cffdb..002ad41317 100644
--- a/man2/open.2
+++ b/man2/open.2
@@ -583,7 +583,7 @@ fd = open("/path/to/dir", O_TMPFILE | O_RDWR,
/* File I/O on 'fd'... */
snprintf(path, PATH_MAX, "/proc/self/fd/%d", fd);
-linkat(AT_FDCWD, path, AT_FDCWD, argv[2],
+linkat(AT_FDCWD, path, AT_FDCWD, "/path/for/file",
AT_SYMLINK_FOLLOW);
.fi
.in