mirror of https://github.com/mkerrisk/man-pages
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>
This commit is contained in:
parent
8e38f6d391
commit
943c52b7bb
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue