Skip to content

Commit

Permalink
fanotify: split version into version and metadata_len
Browse files Browse the repository at this point in the history
To implement per event type optional headers we are interested in
knowing how long the metadata structure is.  This patch slits the __u32
version field into a __u8 version and a __u16 metadata_len field (with
__u8 left over).  This should allow for backwards compat ABI.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
[rewrote descrtion and changed object sizes and ordering - eparis]
Signed-off-by: Eric Paris <eparis@redhat.com>
  • Loading branch information
Alexey Zaytsev authored and Eric Paris committed Dec 15, 2010
1 parent fdbf3ce commit 62731fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/linux/fanotify.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@
FAN_ALL_PERM_EVENTS |\
FAN_Q_OVERFLOW)

#define FANOTIFY_METADATA_VERSION 2
#define FANOTIFY_METADATA_VERSION 3

struct fanotify_event_metadata {
__u32 event_len;
__u32 vers;
__u8 vers;
__u8 reserved;
__u16 metadata_len;
__aligned_u64 mask;
__s32 fd;
__s32 pid;
Expand Down

0 comments on commit 62731fa

Please sign in to comment.