The second program is an example of fanotify being used with
.B FAN_REPORT_FID
enabled.
-The program attempts to mark the filesystem object that is passed as
+The program marks the filesystem object that is passed as
a command-line argument
and waits until an event of type
.B FAN_CREATE
has occurred.
-Depending on whether a file or directory is created depends on what mask
-is returned in the event mask.
+The event mask indicates which type of filesystem object\(emeither
+a file or a directory\(emwas created".
Once all events have been read from the buffer and processed accordingly,
the program simply terminates.
.PP
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 was
- deleted for the object prior to this system call. */
+ 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(AT_FDCWD, file_handle, O_RDONLY);
if (ret == \-1) {