Hello Amir, On 5/29/20 11:25 AM, Amir Goldstein wrote: > FAN_ONDIR has been an input only flag before introduing FAN_REPORT_FID. > With FAN_REPORT_FID it can also be in output mask. > > Move the text describing its role in output mask to fanotify.7 where the > other output mask bits are documented. Thanks. Patch applied. Cheers, Michael > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> > --- > man2/fanotify_mark.2 | 17 +++-------------- > man7/fanotify.7 | 18 ++++++++++++++++++ > 2 files changed, 21 insertions(+), 14 deletions(-) > > diff --git a/man2/fanotify_mark.2 b/man2/fanotify_mark.2 > index f3ebb0208..b6c6c34c4 100644 > --- a/man2/fanotify_mark.2 > +++ b/man2/fanotify_mark.2 > @@ -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. > diff --git a/man7/fanotify.7 b/man7/fanotify.7 > index 3c49d67a9..100ec3ebd 100644 > --- a/man7/fanotify.7 > +++ b/man7/fanotify.7 > @@ -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: > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/