All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Jan Kara <jack@suse.cz>,
	Matthew Bobrowski <mbobrowski@mbobrowski.org>,
	linux-man@vger.kernel.org
Subject: [PATCH 3/3] fanotify.7, fanotify_mark.2: Clarify FAN_ONDIR in output mask
Date: Fri, 29 May 2020 12:25:30 +0300	[thread overview]
Message-ID: <20200529092530.25207-4-amir73il@gmail.com> (raw)
In-Reply-To: <20200529092530.25207-1-amir73il@gmail.com>

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.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 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:
-- 
2.17.1


  parent reply	other threads:[~2020-05-29  9:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29  9:25 [PATCH 0/3] fanotify man page updates for final v5.7 Amir Goldstein
2020-05-29  9:25 ` [PATCH 1/3] Revert "fanotify.7, fanotify_mark.2: Document FAN_DIR_MODIFY" Amir Goldstein
2020-06-07 12:15   ` Matthew Bobrowski
2020-06-08 20:13   ` Michael Kerrisk (man-pages)
2020-05-29  9:25 ` [PATCH 2/3] fanotify_init.2: move out of place entry FAN_REPORT_FID Amir Goldstein
2020-06-07 12:24   ` Matthew Bobrowski
2020-06-08 20:15   ` Michael Kerrisk (man-pages)
2020-05-29  9:25 ` Amir Goldstein [this message]
2020-06-07 12:40   ` [PATCH 3/3] fanotify.7, fanotify_mark.2: Clarify FAN_ONDIR in output mask Matthew Bobrowski
2020-06-08 20:18   ` Michael Kerrisk (man-pages)
2020-06-03 10:26 ` [PATCH 0/3] fanotify man page updates for final v5.7 Michael Kerrisk (man-pages)
2020-06-03 23:57   ` Matthew Bobrowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200529092530.25207-4-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-man@vger.kernel.org \
    --cc=mbobrowski@mbobrowski.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.