]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
fanotify.7, fanotify_mark.2: Clarify FAN_ONDIR in output mask
authorAmir Goldstein <amir73il@gmail.com>
Fri, 29 May 2020 09:25:30 +0000 (12:25 +0300)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 8 Jun 2020 21:07:59 +0000 (23:07 +0200)
FAN_ONDIR was an input only flag before introducing
FAN_REPORT_FID.  Since the introduction of FAN_REPORT_FID, it can
also be in output mask.

Move the text describing its role in the output mask to fanotify.7
where the other output mask bits are documented.

[mtk: commit message tidy-up]

Reviewed-by: Matthew Bobrowski <mbobrowski@mbobrowski.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/fanotify_mark.2
man7/fanotify.7

index f3ebb020881722f1b96486705bd3e6043f93ae06..b6c6c34c48772a8eeb4e85991e825b2d4f4fc5cd 100644 (file)
@@ -278,30 +278,19 @@ Create events for directories\(emfor example, when
 (but see BUGS), and
 .BR closedir (3)
 are called.
-Without this flag, only are created only for files.
-.IP
-The
-.BR FAN_ONDIR
-flag is reported in an event mask only if the
-.I fanotify_fd
-file descriptor has been initialized with the flag
-.BR FAN_REPORT_FID .
+Without this flag, events are created only for files.
 In the context of directory entry events, such as
 .BR FAN_CREATE ,
 .BR FAN_DELETE ,
 .BR FAN_MOVED_FROM ,
 and
-.BR FAN_MOVED_TO
-for example, specifying the flag
+.BR FAN_MOVED_TO ,
+specifying the flag
 .BR FAN_ONDIR
 is required in order to create events when subdirectory entries are
 modified (i.e.,
 .BR mkdir (2)/
 .BR rmdir (2)).
-Subdirectory entry modification events will never be merged with
-nonsubdirectory entry modification events.
-This flag is never reported individually within an event and is always
-supplied in conjunction with another event type.
 .TP
 .B FAN_EVENT_ON_CHILD
 Events for the immediate children of marked directories shall be created.
index cb5193d4656b652ccace77d025243c414c7eac42..2d80a01fb195ea2c565a2d3c532914cad08b5e73 100644 (file)
@@ -381,6 +381,24 @@ This is a synonym for:
 .IP
     FAN_MOVED_FROM | FAN_MOVED_TO
 .PP
+The following bits may appear in
+.I mask
+only in conjunction with other event type bits:
+.TP
+.B FAN_ONDIR
+The events described in the
+.I mask
+have occurred on a directory object.
+Reporting events on directories requires setting this flag in the mark mask.
+See
+.BR fanotify_mark (2)
+for additional details.
+The
+.BR FAN_ONDIR
+flag is reported in an event mask only if the fanotify group has been
+initialized with the flag
+.BR FAN_REPORT_FID .
+.PP
 The fields of the
 .I fanotify_event_info_fid
 structure are as follows: