]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
fanotify: split version into version and metadata_len
authorAlexey Zaytsev <alexey.zaytsev@gmail.com>
Mon, 22 Nov 2010 00:33:03 +0000 (00:33 +0000)
committerEric Paris <eparis@redhat.com>
Wed, 15 Dec 2010 18:56:33 +0000 (13:56 -0500)
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>
include/linux/fanotify.h

index c73224315aee6fc92a26268172a9d4fcab5a01a2..6c6133f76e163c88041c4a13a4b091ef6ccf13ac 100644 (file)
                                 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;