fanotify.7: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2020-09-15 07:38:52 +02:00
parent 8eb90116f1
commit 1aaa7bcd6a
1 changed files with 11 additions and 10 deletions

View File

@ -1088,8 +1088,9 @@ main(int argc, char **argv)
}
/* Create an fanotify file descriptor with FAN_REPORT_DFID_NAME as a flag
so that program can receive fid events with directory entry name. */
/* Create an fanotify file descriptor with FAN_REPORT_DFID_NAME as
a flag so that program can receive fid events with directory
entry name. */
fd = fanotify_init(FAN_CLASS_NOTIF | FAN_REPORT_DFID_NAME, 0);
if (fd == \-1) {
@ -1144,14 +1145,14 @@ main(int argc, char **argv)
if (metadata\->mask == (FAN_CREATE | FAN_ONDIR))
printf("FAN_CREATE | FAN_ONDIR (subdirectory created):\en");
/* metadata\->fd is set to FAN_NOFD when the group identifies objects
by file handles. To obtain a file descriptor for the file object
corresponding to an event you can use the struct file_handle
that\(aqs provided within the fanotify_event_info_fid in
conjunction with the open_by_handle_at(2) system call.
A check for ESTALE is done to accommodate for the situation
where the file handle for the object was deleted prior to
this system call. */
/* metadata\->fd is set to FAN_NOFD when the group identifies
objects by file handles. To obtain a file descriptor for
the file object corresponding to an event you can use the
struct file_handle that\(aqs provided within the
fanotify_event_info_fid in conjunction with the
open_by_handle_at(2) system call. A check for ESTALE is
done to accommodate for the situation where the file handle
for the object was deleted prior to this system call. */
event_fd = open_by_handle_at(mount_fd, file_handle, O_RDONLY);
if (event_fd == \-1) {