* [PATCH 1/4] fanotify.7: tfix
@ 2019-09-02 6:55 Jakub Wilk
2019-09-02 6:55 ` [PATCH 2/4] fanotify_mark.2: ffix Jakub Wilk
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Jakub Wilk @ 2019-09-02 6:55 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
---
man7/fanotify.7 | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/man7/fanotify.7 b/man7/fanotify.7
index b8e0755aa..fb64f06c1 100644
--- a/man7/fanotify.7
+++ b/man7/fanotify.7
@@ -927,7 +927,7 @@ and waits until an event of type
.B FAN_CREATE
has occurred.
The event mask indicates which type of filesystem object\(emeither
-a file or a directory\(emwas created".
+a file or a directory\(emwas created.
Once all events have been read from the buffer and processed accordingly,
the program simply terminates.
.PP
@@ -1008,7 +1008,7 @@ main(int argc, char **argv)
struct fanotify_event_info_fid *fid;
if (argc != 2) {
- fprintf(stderr, "Invalid number of command line arguments.\e\n");
+ fprintf(stderr, "Invalid number of command line arguments.\en");
exit(EXIT_FAILURE);
}
@@ -1031,7 +1031,7 @@ main(int argc, char **argv)
exit(EXIT_FAILURE);
}
- printf("Listening for events.\e\n");
+ printf("Listening for events.\en");
/* Read events from the event queue into a buffer */
@@ -1047,22 +1047,22 @@ main(int argc, char **argv)
FAN_EVENT_OK(metadata, len);
metadata = FAN_EVENT_NEXT(metadata, len)) {
fid = (struct fanotify_event_info_fid *) (metadata + 1);
- file_handle = (struct file_handle *) fid->handle;
+ file_handle = (struct file_handle *) fid\->handle;
/* Ensure that the event info is of the correct type */
- if (fid->hdr.info_type != FAN_EVENT_INFO_TYPE_FID) {
- fprintf(stderr, "Received unexpected event info type.\e\n");
+ if (fid\->hdr.info_type != FAN_EVENT_INFO_TYPE_FID) {
+ fprintf(stderr, "Received unexpected event info type.\en");
exit(EXIT_FAILURE);
}
- if (metadata->mask == FAN_CREATE)
+ if (metadata\->mask == FAN_CREATE)
printf("FAN_CREATE (file created):");
- if (metadata->mask == FAN_CREATE | FAN_ONDIR)
+ if (metadata\->mask == FAN_CREATE | FAN_ONDIR)
printf("FAN_CREATE | FAN_ONDIR (subdirectory created):");
- /* metadata->fd is set to FAN_NOFD when FAN_REPORT_FID is enabled.
+ /* metadata\->fd is set to FAN_NOFD when FAN_REPORT_FID is enabled.
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
@@ -1074,7 +1074,7 @@ main(int argc, char **argv)
if (ret == \-1) {
if (errno == ESTALE) {
printf("File handle is no longer valid. "
- "File has been deleted\e\n");
+ "File has been deleted\en");
continue;
} else {
perror("open_by_handle_at");
@@ -1093,15 +1093,15 @@ main(int argc, char **argv)
exit(EXIT_FAILURE);
}
- path[path_len] = \(aq\e\0\(aq;
- printf("\etDirectory \(aq%s\(aq has been modified.\e\n", path);
+ path[path_len] = \(aq\e0\(aq;
+ printf("\etDirectory \(aq%s\(aq has been modified.\en", path);
/* Close associated file descriptor for this event */
close(event_fd);
}
- printf("All events processed successfully. Program exiting.\e\n");
+ printf("All events processed successfully. Program exiting.\en");
exit(EXIT_SUCCESS);
}
.EE
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/4] fanotify_mark.2: ffix
2019-09-02 6:55 [PATCH 1/4] fanotify.7: tfix Jakub Wilk
@ 2019-09-02 6:55 ` Jakub Wilk
2019-09-05 13:46 ` Michael Kerrisk (man-pages)
2019-09-02 6:55 ` [PATCH 3/4] fanotify_mark.2: Add kernel version numbers for some FAN_* constants Jakub Wilk
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Jakub Wilk @ 2019-09-02 6:55 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
---
man2/fanotify_mark.2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man2/fanotify_mark.2 b/man2/fanotify_mark.2
index 67e3a3d70..7a497f29c 100644
--- a/man2/fanotify_mark.2
+++ b/man2/fanotify_mark.2
@@ -176,7 +176,7 @@ Create an event when a read-only file or directory is closed.
.B FAN_OPEN
Create an event when a file or directory is opened.
.TP
-.B FAN_OPEN_EXEC " (since Linux 5.0)"
+.BR FAN_OPEN_EXEC " (since Linux 5.0)"
Create an event when a file is opened with the intent to be executed.
See NOTES for additional details.
.TP
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/4] fanotify_mark.2: ffix
2019-09-02 6:55 ` [PATCH 2/4] fanotify_mark.2: ffix Jakub Wilk
@ 2019-09-05 13:46 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 8+ messages in thread
From: Michael Kerrisk (man-pages) @ 2019-09-05 13:46 UTC (permalink / raw)
To: Jakub Wilk; +Cc: mtk.manpages, linux-man
Hello Jakub,
On 9/2/19 8:55 AM, Jakub Wilk wrote:
> Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Thanks. Patch applied.
Cheers,
Michael
> ---
> man2/fanotify_mark.2 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man2/fanotify_mark.2 b/man2/fanotify_mark.2
> index 67e3a3d70..7a497f29c 100644
> --- a/man2/fanotify_mark.2
> +++ b/man2/fanotify_mark.2
> @@ -176,7 +176,7 @@ Create an event when a read-only file or directory is closed.
> .B FAN_OPEN
> Create an event when a file or directory is opened.
> .TP
> -.B FAN_OPEN_EXEC " (since Linux 5.0)"
> +.BR FAN_OPEN_EXEC " (since Linux 5.0)"
> Create an event when a file is opened with the intent to be executed.
> See NOTES for additional details.
> .TP
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/4] fanotify_mark.2: Add kernel version numbers for some FAN_* constants
2019-09-02 6:55 [PATCH 1/4] fanotify.7: tfix Jakub Wilk
2019-09-02 6:55 ` [PATCH 2/4] fanotify_mark.2: ffix Jakub Wilk
@ 2019-09-02 6:55 ` Jakub Wilk
2019-09-05 13:47 ` Michael Kerrisk (man-pages)
2019-09-02 6:55 ` [PATCH 4/4] fanotify_mark.2: Document FAN_MOVE_SELF Jakub Wilk
2019-09-05 13:45 ` [PATCH 1/4] fanotify.7: tfix Michael Kerrisk (man-pages)
3 siblings, 1 reply; 8+ messages in thread
From: Jakub Wilk @ 2019-09-02 6:55 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
---
man2/fanotify_mark.2 | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/man2/fanotify_mark.2 b/man2/fanotify_mark.2
index 7a497f29c..e62b6d2c2 100644
--- a/man2/fanotify_mark.2
+++ b/man2/fanotify_mark.2
@@ -177,28 +177,35 @@ Create an event when a read-only file or directory is closed.
Create an event when a file or directory is opened.
.TP
.BR FAN_OPEN_EXEC " (since Linux 5.0)"
+.\" commit 9b076f1c0f4869b838a1b7aa0edb5664d47ec8aa
Create an event when a file is opened with the intent to be executed.
See NOTES for additional details.
.TP
-.B FAN_ATTRIB
+.BR FAN_ATTRIB " (since Linux 5.1)"
+.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
Create an event when the metadata for a file or directory has changed.
.TP
-.B FAN_CREATE
+.BR FAN_CREATE " (since Linux 5.1)"
+.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
Create an event when a file or directory has been created in a marked
parent directory.
.TP
-.B FAN_DELETE
+.BR FAN_DELETE " (since Linux 5.1)"
+.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
Create an event when a file or directory has been deleted in a marked
parent directory.
.TP
-.B FAN_DELETE_SELF
+.BR FAN_DELETE_SELF " (since Linux 5.1)"
+.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
Create an event when a marked file or directory itself is deleted.
.TP
-.B FAN_MOVED_FROM
+.BR FAN_MOVED_FROM " (since Linux 5.1)"
+.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
Create an event when a file or directory has been moved from a marked
parent directory.
.TP
-.B FAN_MOVED_TO
+.BR FAN_MOVED_TO " (since Linux 5.1)"
+.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
Create an event when a file or directory has been moved to a marked parent
directory.
.TP
@@ -218,6 +225,7 @@ or
is required.
.TP
.BR FAN_OPEN_EXEC_PERM " (since Linux 5.0)"
+.\" commit 66917a3130f218dcef9eeab4fd11a71cd00cd7c9
Create an event when a permission to open a file for execution is
requested.
An fanotify file descriptor created with
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/4] fanotify_mark.2: Add kernel version numbers for some FAN_* constants
2019-09-02 6:55 ` [PATCH 3/4] fanotify_mark.2: Add kernel version numbers for some FAN_* constants Jakub Wilk
@ 2019-09-05 13:47 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 8+ messages in thread
From: Michael Kerrisk (man-pages) @ 2019-09-05 13:47 UTC (permalink / raw)
To: Jakub Wilk; +Cc: mtk.manpages, linux-man
Hell Jakub,
On 9/2/19 8:55 AM, Jakub Wilk wrote:
> Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Thanks for the updates, including also the comments with kernel
commits where they were missing. Patch applied.
Cheers,
Michael
> ---
> man2/fanotify_mark.2 | 20 ++++++++++++++------
> 1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/man2/fanotify_mark.2 b/man2/fanotify_mark.2
> index 7a497f29c..e62b6d2c2 100644
> --- a/man2/fanotify_mark.2
> +++ b/man2/fanotify_mark.2
> @@ -177,28 +177,35 @@ Create an event when a read-only file or directory is closed.
> Create an event when a file or directory is opened.
> .TP
> .BR FAN_OPEN_EXEC " (since Linux 5.0)"
> +.\" commit 9b076f1c0f4869b838a1b7aa0edb5664d47ec8aa
> Create an event when a file is opened with the intent to be executed.
> See NOTES for additional details.
> .TP
> -.B FAN_ATTRIB
> +.BR FAN_ATTRIB " (since Linux 5.1)"
> +.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
> Create an event when the metadata for a file or directory has changed.
> .TP
> -.B FAN_CREATE
> +.BR FAN_CREATE " (since Linux 5.1)"
> +.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
> Create an event when a file or directory has been created in a marked
> parent directory.
> .TP
> -.B FAN_DELETE
> +.BR FAN_DELETE " (since Linux 5.1)"
> +.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
> Create an event when a file or directory has been deleted in a marked
> parent directory.
> .TP
> -.B FAN_DELETE_SELF
> +.BR FAN_DELETE_SELF " (since Linux 5.1)"
> +.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
> Create an event when a marked file or directory itself is deleted.
> .TP
> -.B FAN_MOVED_FROM
> +.BR FAN_MOVED_FROM " (since Linux 5.1)"
> +.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
> Create an event when a file or directory has been moved from a marked
> parent directory.
> .TP
> -.B FAN_MOVED_TO
> +.BR FAN_MOVED_TO " (since Linux 5.1)"
> +.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
> Create an event when a file or directory has been moved to a marked parent
> directory.
> .TP
> @@ -218,6 +225,7 @@ or
> is required.
> .TP
> .BR FAN_OPEN_EXEC_PERM " (since Linux 5.0)"
> +.\" commit 66917a3130f218dcef9eeab4fd11a71cd00cd7c9
> Create an event when a permission to open a file for execution is
> requested.
> An fanotify file descriptor created with
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 4/4] fanotify_mark.2: Document FAN_MOVE_SELF
2019-09-02 6:55 [PATCH 1/4] fanotify.7: tfix Jakub Wilk
2019-09-02 6:55 ` [PATCH 2/4] fanotify_mark.2: ffix Jakub Wilk
2019-09-02 6:55 ` [PATCH 3/4] fanotify_mark.2: Add kernel version numbers for some FAN_* constants Jakub Wilk
@ 2019-09-02 6:55 ` Jakub Wilk
2019-09-05 14:05 ` Michael Kerrisk (man-pages)
2019-09-05 13:45 ` [PATCH 1/4] fanotify.7: tfix Michael Kerrisk (man-pages)
3 siblings, 1 reply; 8+ messages in thread
From: Jakub Wilk @ 2019-09-02 6:55 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: linux-man
Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
---
man2/fanotify_mark.2 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/man2/fanotify_mark.2 b/man2/fanotify_mark.2
index e62b6d2c2..7c21cc22b 100644
--- a/man2/fanotify_mark.2
+++ b/man2/fanotify_mark.2
@@ -209,6 +209,10 @@ parent directory.
Create an event when a file or directory has been moved to a marked parent
directory.
.TP
+.BR FAN_MOVE_SELF " (since Linux 5.1)"
+.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
+Create an event when a marked file or directory itself has been moved.
+.TP
.B FAN_Q_OVERFLOW
Create an event when an overflow of the event queue occurs.
The size of the event queue is limited to 16384 entries if
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] fanotify_mark.2: Document FAN_MOVE_SELF
2019-09-02 6:55 ` [PATCH 4/4] fanotify_mark.2: Document FAN_MOVE_SELF Jakub Wilk
@ 2019-09-05 14:05 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 8+ messages in thread
From: Michael Kerrisk (man-pages) @ 2019-09-05 14:05 UTC (permalink / raw)
To: Jakub Wilk; +Cc: mtk.manpages, linux-man
Hello Jakub,
On 9/2/19 8:55 AM, Jakub Wilk wrote:
> Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Patch applied.
Thanks,
Michael
> ---
> man2/fanotify_mark.2 | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/man2/fanotify_mark.2 b/man2/fanotify_mark.2
> index e62b6d2c2..7c21cc22b 100644
> --- a/man2/fanotify_mark.2
> +++ b/man2/fanotify_mark.2
> @@ -209,6 +209,10 @@ parent directory.
> Create an event when a file or directory has been moved to a marked parent
> directory.
> .TP
> +.BR FAN_MOVE_SELF " (since Linux 5.1)"
> +.\" commit 235328d1fa4251c6dcb32351219bb553a58838d2
> +Create an event when a marked file or directory itself has been moved.
> +.TP
> .B FAN_Q_OVERFLOW
> Create an event when an overflow of the event queue occurs.
> The size of the event queue is limited to 16384 entries if
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] fanotify.7: tfix
2019-09-02 6:55 [PATCH 1/4] fanotify.7: tfix Jakub Wilk
` (2 preceding siblings ...)
2019-09-02 6:55 ` [PATCH 4/4] fanotify_mark.2: Document FAN_MOVE_SELF Jakub Wilk
@ 2019-09-05 13:45 ` Michael Kerrisk (man-pages)
3 siblings, 0 replies; 8+ messages in thread
From: Michael Kerrisk (man-pages) @ 2019-09-05 13:45 UTC (permalink / raw)
To: Jakub Wilk; +Cc: mtk.manpages, linux-man
Hello Jakub,
On 9/2/19 8:55 AM, Jakub Wilk wrote:
> Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
Thanks. Nice set if clean-ups! Patch applied.
Cheers,
Michael
> ---
> man7/fanotify.7 | 26 +++++++++++++-------------
> 1 file changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/man7/fanotify.7 b/man7/fanotify.7
> index b8e0755aa..fb64f06c1 100644
> --- a/man7/fanotify.7
> +++ b/man7/fanotify.7
> @@ -927,7 +927,7 @@ and waits until an event of type
> .B FAN_CREATE
> has occurred.
> The event mask indicates which type of filesystem object\(emeither
> -a file or a directory\(emwas created".
> +a file or a directory\(emwas created.
> Once all events have been read from the buffer and processed accordingly,
> the program simply terminates.
> .PP
> @@ -1008,7 +1008,7 @@ main(int argc, char **argv)
> struct fanotify_event_info_fid *fid;
>
> if (argc != 2) {
> - fprintf(stderr, "Invalid number of command line arguments.\e\n");
> + fprintf(stderr, "Invalid number of command line arguments.\en");
> exit(EXIT_FAILURE);
> }
>
> @@ -1031,7 +1031,7 @@ main(int argc, char **argv)
> exit(EXIT_FAILURE);
> }
>
> - printf("Listening for events.\e\n");
> + printf("Listening for events.\en");
>
> /* Read events from the event queue into a buffer */
>
> @@ -1047,22 +1047,22 @@ main(int argc, char **argv)
> FAN_EVENT_OK(metadata, len);
> metadata = FAN_EVENT_NEXT(metadata, len)) {
> fid = (struct fanotify_event_info_fid *) (metadata + 1);
> - file_handle = (struct file_handle *) fid->handle;
> + file_handle = (struct file_handle *) fid\->handle;
>
> /* Ensure that the event info is of the correct type */
>
> - if (fid->hdr.info_type != FAN_EVENT_INFO_TYPE_FID) {
> - fprintf(stderr, "Received unexpected event info type.\e\n");
> + if (fid\->hdr.info_type != FAN_EVENT_INFO_TYPE_FID) {
> + fprintf(stderr, "Received unexpected event info type.\en");
> exit(EXIT_FAILURE);
> }
>
> - if (metadata->mask == FAN_CREATE)
> + if (metadata\->mask == FAN_CREATE)
> printf("FAN_CREATE (file created):");
>
> - if (metadata->mask == FAN_CREATE | FAN_ONDIR)
> + if (metadata\->mask == FAN_CREATE | FAN_ONDIR)
> printf("FAN_CREATE | FAN_ONDIR (subdirectory created):");
>
> - /* metadata->fd is set to FAN_NOFD when FAN_REPORT_FID is enabled.
> + /* metadata\->fd is set to FAN_NOFD when FAN_REPORT_FID is enabled.
> 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
> @@ -1074,7 +1074,7 @@ main(int argc, char **argv)
> if (ret == \-1) {
> if (errno == ESTALE) {
> printf("File handle is no longer valid. "
> - "File has been deleted\e\n");
> + "File has been deleted\en");
> continue;
> } else {
> perror("open_by_handle_at");
> @@ -1093,15 +1093,15 @@ main(int argc, char **argv)
> exit(EXIT_FAILURE);
> }
>
> - path[path_len] = \(aq\e\0\(aq;
> - printf("\etDirectory \(aq%s\(aq has been modified.\e\n", path);
> + path[path_len] = \(aq\e0\(aq;
> + printf("\etDirectory \(aq%s\(aq has been modified.\en", path);
>
> /* Close associated file descriptor for this event */
>
> close(event_fd);
> }
>
> - printf("All events processed successfully. Program exiting.\e\n");
> + printf("All events processed successfully. Program exiting.\en");
> exit(EXIT_SUCCESS);
> }
> .EE
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-09-05 14:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02 6:55 [PATCH 1/4] fanotify.7: tfix Jakub Wilk
2019-09-02 6:55 ` [PATCH 2/4] fanotify_mark.2: ffix Jakub Wilk
2019-09-05 13:46 ` Michael Kerrisk (man-pages)
2019-09-02 6:55 ` [PATCH 3/4] fanotify_mark.2: Add kernel version numbers for some FAN_* constants Jakub Wilk
2019-09-05 13:47 ` Michael Kerrisk (man-pages)
2019-09-02 6:55 ` [PATCH 4/4] fanotify_mark.2: Document FAN_MOVE_SELF Jakub Wilk
2019-09-05 14:05 ` Michael Kerrisk (man-pages)
2019-09-05 13:45 ` [PATCH 1/4] fanotify.7: tfix Michael Kerrisk (man-pages)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).