summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2014-05-19 07:16:20 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2014-05-21 08:59:04 +0200
commit98f7d53c92bda47c2a05af717e0dfdd89087362f (patch)
tree384d3ebbc43d625d41698581da2014239723de46
parent0acc5c6d668bdc77ab07e1dbb06091169fc6899a (diff)
fanotify.7: Fix description of FAN_EVENT_NEXT()
FAN_EVENT_NEXT() does not update 'meta'; rather, it returns a pointer to the next metadata structure. In addition, generally rework the description to be a bit clearer and more detailed. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
-rw-r--r--man7/fanotify.723
1 files changed, 17 insertions, 6 deletions
diff --git a/man7/fanotify.7 b/man7/fanotify.7
index 1798b1af2..73dd802ac 100644
--- a/man7/fanotify.7
+++ b/man7/fanotify.7
@@ -309,13 +309,24 @@ against the length of the metadata structure and the
field of the first metadata structure in the buffer.
.TP
.B FAN_EVENT_NEXT(meta, len)
-This macro sets the pointer
-.I meta
-to the next metadata structure using the length indicated in the
+This macro uses the length indicated in the
.I event_len
-field of the metadata structure and reduces the remaining length of the
-buffer
-.IR len .
+field of the metadata structure pointed to by
+.IR meta
+to calculate the address of the next metadata structure that follows
+.IR meta .
+.I len
+is the number of bytes of metadata that currently remain in the buffer.
+The macro returns a pointer to the next metadata structure that follows
+.IR meta ,
+and reduces
+.I len
+by the number of bytes in the the metadata structure that
+has been skipped over (i.e., it subtracts
+.IR meta\->event_len
+from
+.IR len ).
+.\"
.SS Monitoring an fanotify file descriptor for events
When an fanotify event occurs, the fanotify file descriptor indicates as
readable when passed to