aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2014-11-03 19:06:38 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2014-11-11 06:38:27 +0100
commit943c52b7bbdbf6c6256e93c1141839efd04e09fa (patch)
treec7f515de5b66af1e20c4dda86e379264cb1c2f78
parent8e38f6d3915f42e56c539b163e1203ed1a6d5f1a (diff)
downloadman-pages-943c52b7bbdbf6c6256e93c1141839efd04e09fa.tar.gz
fanotify.7: Allow relative paths in example
The current example code requires passing an absolute path to the mount to be watched. By passing AT_FDCWD to fanotify_mark it can use both absolute and relative paths. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man7/fanotify.72
1 files changed, 1 insertions, 1 deletions
diff --git a/man7/fanotify.7 b/man7/fanotify.7
index 9d7ae7f32f..e0530a881a 100644
--- a/man7/fanotify.7
+++ b/man7/fanotify.7
@@ -691,7 +691,7 @@ main(int argc, char *argv[])
file descriptor */
if (fanotify_mark(fd, FAN_MARK_ADD | FAN_MARK_MOUNT,
- FAN_OPEN_PERM | FAN_CLOSE_WRITE, \-1,
+ FAN_OPEN_PERM | FAN_CLOSE_WRITE, AT_FDCWD,
argv[1]) == \-1) {
perror("fanotify_mark");
exit(EXIT_FAILURE);