mirror of https://github.com/mkerrisk/man-pages
fanotify_init.2, fanotify_mark.2, fanotify.7: Minor fixes to Matthew Bobrowski's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
0a4db6dc74
commit
817c8240f3
|
@ -1,4 +1,4 @@
|
|||
.\" Copyright (C) 2013, Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
\" Copyright (C) 2013, Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
.\"
|
||||
.\" %%%LICENSE_START(VERBATIM)
|
||||
.\" Permission is granted to make and distribute verbatim copies of this
|
||||
|
@ -108,7 +108,7 @@ Additionally, it may be used for applications that are interested in
|
|||
directory entry events, such as
|
||||
.BR FAN_CREATE ,
|
||||
.BR FAN_ATTRIB ,
|
||||
.BR FAN_MOVE
|
||||
.BR FAN_MOVE ,
|
||||
and
|
||||
.BR FAN_DELETE
|
||||
for example.
|
||||
|
|
|
@ -236,7 +236,7 @@ or
|
|||
is required.
|
||||
.TP
|
||||
.B FAN_ONDIR
|
||||
Create events for directories \(em for example, when
|
||||
Create events for directories\(emfor example, when
|
||||
.BR opendir (3),
|
||||
.BR readdir (3)
|
||||
(but see BUGS), and
|
||||
|
@ -252,15 +252,17 @@ file descriptor has been initialized with the flag
|
|||
In the context of directory entry events, such as
|
||||
.BR FAN_CREATE ,
|
||||
.BR FAN_DELETE ,
|
||||
.BR FAN_MOVED_FROM
|
||||
.BR FAN_MOVED_FROM ,
|
||||
and
|
||||
.BR FAN_MOVED_TO
|
||||
for example, specifying the flag
|
||||
.BR FAN_ONDIR
|
||||
is required in order to create events when subdirectory entries are
|
||||
modified (i.e. mkdir/rmdir).
|
||||
Subdirectory entry modification events will never be merged with non
|
||||
subdirectory entry modification events.
|
||||
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
|
||||
|
@ -396,10 +398,12 @@ do not specify a directory.
|
|||
.B EXDEV
|
||||
The object indicated by
|
||||
.I pathname
|
||||
resides within a filesystem subvolume (e.g. btrfs) which uses a different
|
||||
resides within a filesystem subvolume (e.g.,
|
||||
.BR btrfs (5))
|
||||
which uses a different
|
||||
.I fsid
|
||||
than its root superblock.
|
||||
This error can only be returned when an fanotify file descriptor returned
|
||||
This error can be returned only when an fanotify file descriptor returned
|
||||
by
|
||||
.BR fanotify_init (2)
|
||||
has been created with
|
||||
|
@ -410,8 +414,9 @@ The object indicated by
|
|||
.I pathname
|
||||
is not associated with a filesystem that supports
|
||||
.I fsid
|
||||
(e.g. tmpfs).
|
||||
This error can only be returned when an fanotify file descriptor returned
|
||||
(e.g.,
|
||||
.BR tmpfs (5)).
|
||||
This error can be returned only when an fanotify file descriptor returned
|
||||
by
|
||||
.BR fanotify_init (2)
|
||||
has been created with
|
||||
|
@ -422,7 +427,7 @@ The object indicated by
|
|||
.I pathname
|
||||
is associated with a filesystem that does not support the encoding of file
|
||||
handles.
|
||||
This error can only be returned when an fanotify file descriptor returned
|
||||
This error can be returned only when an fanotify file descriptor returned
|
||||
by
|
||||
.BR fanotify_init (2)
|
||||
has been created with
|
||||
|
|
|
@ -114,7 +114,7 @@ Notification events are merely informative
|
|||
and require no action to be taken by
|
||||
the receiving application with the exception being that the file
|
||||
descriptor provided within a generic event must be closed.
|
||||
The closing of file descriptors for each event only applies to
|
||||
The closing of file descriptors for each event applies only to
|
||||
applications that have initialized fanotify without using
|
||||
.BR FAN_REPORT_FID
|
||||
(see below).
|
||||
|
@ -166,7 +166,7 @@ struct fanotify_event_metadata {
|
|||
.EE
|
||||
.in
|
||||
.PP
|
||||
In the instance that
|
||||
In the case where
|
||||
.BR FAN_REPORT_FID
|
||||
is supplied as one of the flags to
|
||||
.BR fanotify_init (2),
|
||||
|
@ -391,7 +391,7 @@ This is a structure of type
|
|||
It is a generic header that contains information used to describe
|
||||
additional information attached to the event.
|
||||
For example, when an fanotify file descriptor is created using
|
||||
.B FAN_REPORT_FID
|
||||
.BR FAN_REPORT_FID ,
|
||||
the
|
||||
.I info_type
|
||||
field of this header is set to
|
||||
|
@ -422,21 +422,22 @@ This is a variable length structure of type
|
|||
.IR file_handle .
|
||||
It is an opaque handle that corresponds to a specified object on a
|
||||
filesystem as returned by
|
||||
.BR name_to_handle_at (2) .
|
||||
.BR name_to_handle_at (2).
|
||||
It can be used to uniquely identify a file on a filesystem and can be
|
||||
passed as an argument to
|
||||
.BR open_by_handle_at (2) .
|
||||
.BR open_by_handle_at (2).
|
||||
Note that for directory entry events, such as
|
||||
.BR FAN_CREATE ,
|
||||
.BR FAN_DELETE ,
|
||||
.BR FAN_MOVE
|
||||
and
|
||||
.BR FAN_MOVE ,
|
||||
the
|
||||
.IR file_handle
|
||||
describes the modified directory and not the created/deleted/moved child
|
||||
object.
|
||||
The events
|
||||
.BR FAN_ATTRIB ,
|
||||
.BR FAN_DELETE_SELF
|
||||
.BR FAN_DELETE_SELF ,
|
||||
and
|
||||
.BR FAN_MOVE_SELF
|
||||
will carry the
|
||||
|
@ -716,7 +717,7 @@ event occurred.
|
|||
Execution of the program ends when the user presses the ENTER key.
|
||||
.PP
|
||||
The second example program output was captured from fanotify_fid.
|
||||
There are two discrete invocations to this program with each invocation
|
||||
There are two discrete invocations of this program, with each invocation
|
||||
accommodating a different action performed on a watched object.
|
||||
This first session shows a mark being placed on
|
||||
.IR /home/user .
|
||||
|
@ -1069,7 +1070,7 @@ int main(int argc, char **argv)
|
|||
|
||||
snprintf(procfd_path, sizeof(procfd_path), "/proc/self/fd/%d", event_fd);
|
||||
|
||||
/* Retreive and print the path of the modified dentry */
|
||||
/* Retrieve and print the path of the modified dentry */
|
||||
path_len = readlink(procfd_path, path, sizeof(path) - 1);
|
||||
if (path_len == -1) {
|
||||
perror("readlink");
|
||||
|
|
Loading…
Reference in New Issue