2010-11-24 17:24:05

by Lino Sanfilippo

[permalink] [raw]
Subject: [PATCH 1/2] fanotify: Introduce FAN_NOFD


FAN_NOFD is used in fanotify events that do not provide an open file
descriptor (like the overflow_event).

Signed-off-by: Lino Sanfilippo <[email protected]>
---
include/linux/fanotify.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

Please apply this against commit 9df291342d1330d4d2ddf389820f58dda975f8dd
of branch 'origin/for-next' from git.infradead.org/users/eparis/notify.git

diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h
index 3db66ef..d6ec57a 100644
--- a/include/linux/fanotify.h
+++ b/include/linux/fanotify.h
@@ -104,6 +104,8 @@ struct fanotify_response {
/* Legit userspace responses to a _PERM event */
#define FAN_ALLOW 0x01
#define FAN_DENY 0x02
+/* No fd set in event */
+#define FAN_NOFD -1

/* Helper functions to deal with fanotify_event_metadata buffers */
#define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata))
--
1.5.6.5


2010-11-29 20:40:19

by Eric Paris

[permalink] [raw]
Subject: Re: [PATCH 1/2] fanotify: Introduce FAN_NOFD

On Wed, 2010-11-24 at 18:22 +0100, Lino Sanfilippo wrote:
> FAN_NOFD is used in fanotify events that do not provide an open file
> descriptor (like the overflow_event).
>
> Signed-off-by: Lino Sanfilippo <[email protected]>

applied to for-next