mirror of https://github.com/mkerrisk/man-pages
fanotify.7: Minor fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
f75d27e6b0
commit
7ea227bdde
|
@ -30,7 +30,7 @@ The
|
||||||
API provides notification and interception of filesystem events.
|
API provides notification and interception of filesystem events.
|
||||||
Use cases include virus scanning and hierarchical storage management.
|
Use cases include virus scanning and hierarchical storage management.
|
||||||
Currently, only a limited set of events is supported.
|
Currently, only a limited set of events is supported.
|
||||||
In particular there is no support for create, delete, and move events.
|
In particular, there is no support for create, delete, and move events.
|
||||||
|
|
||||||
Additional capabilities compared to the
|
Additional capabilities compared to the
|
||||||
.BR inotify (7)
|
.BR inotify (7)
|
||||||
|
@ -51,15 +51,17 @@ and
|
||||||
creates and initializes an fanotify notification group and returns a file
|
creates and initializes an fanotify notification group and returns a file
|
||||||
descriptor referring to it.
|
descriptor referring to it.
|
||||||
.PP
|
.PP
|
||||||
An fanotify notification group is an internal object of the kernel which holds
|
An fanotify notification group is a kernel-internal object that holds
|
||||||
a list of files, directories, and mount points for which events shall be
|
a list of files, directories, and mount points for which events shall be
|
||||||
created.
|
created.
|
||||||
.PP
|
.PP
|
||||||
For each entry in an fanotify notification group, two bit masks exist.
|
For each entry in an fanotify notification group, two bit masks exist: the
|
||||||
One mask (the mark mask) defines file activities for which an event shall be
|
.I mark
|
||||||
created.
|
mask and the
|
||||||
Another mask (the ignore mask) defines activities for which no event shall be
|
.I ignore
|
||||||
generated.
|
mask.
|
||||||
|
The mark mask defines file activities for which an event shall be created.
|
||||||
|
The ignore mask defines activities for which no event shall be generated.
|
||||||
Having these two types of masks permits a mount point or directory to be
|
Having these two types of masks permits a mount point or directory to be
|
||||||
marked for receiving events, while at the same time ignoring events for
|
marked for receiving events, while at the same time ignoring events for
|
||||||
specific objects under that mount point or directory.
|
specific objects under that mount point or directory.
|
||||||
|
@ -132,7 +134,7 @@ The return value of
|
||||||
.BR read (2)
|
.BR read (2)
|
||||||
is the length of the filled buffer, or \-1 in case of an error.
|
is the length of the filled buffer, or \-1 in case of an error.
|
||||||
After a successful
|
After a successful
|
||||||
.BR read(2),
|
.BR read (2),
|
||||||
the read buffer contains one or more of the following structures:
|
the read buffer contains one or more of the following structures:
|
||||||
|
|
||||||
.in +4n
|
.in +4n
|
||||||
|
@ -153,11 +155,11 @@ struct fanotify_event_metadata {
|
||||||
.I event_len
|
.I event_len
|
||||||
This is the length of the data for the current event and the offset to the next
|
This is the length of the data for the current event and the offset to the next
|
||||||
event in the buffer.
|
event in the buffer.
|
||||||
In the current implementation the value of
|
In the current implementation, the value of
|
||||||
.I event_len
|
.I event_len
|
||||||
is always
|
is always
|
||||||
.BR FAN_EVENT_METADATA_LEN .
|
.BR FAN_EVENT_METADATA_LEN .
|
||||||
In principal the API design would allow to return variable length structures.
|
In principle, the API design would allow to return variable-length structures.
|
||||||
Therefore, and for performance reasons, it is recommended to use a larger
|
Therefore, and for performance reasons, it is recommended to use a larger
|
||||||
buffer size when reading, for example 4096 bytes.
|
buffer size when reading, for example 4096 bytes.
|
||||||
.TP
|
.TP
|
||||||
|
@ -277,7 +279,7 @@ to the next metadata structure using the length indicated in the
|
||||||
.I event_len
|
.I event_len
|
||||||
field of the metadata structure and reduces the remaining length of the
|
field of the metadata structure and reduces the remaining length of the
|
||||||
buffer
|
buffer
|
||||||
.IT len .
|
.IR len .
|
||||||
.PP
|
.PP
|
||||||
For permission events, the application must
|
For permission events, the application must
|
||||||
.BR write (2)
|
.BR write (2)
|
||||||
|
|
Loading…
Reference in New Issue