]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/patches/linux-libc-headers-2.6.12.0-inotify-3.patch
updxlerator: Disable call of chmod on downloader.
[people/teissler/ipfire-2.x.git] / src / patches / linux-libc-headers-2.6.12.0-inotify-3.patch
CommitLineData
9b0ff0a0
MT
1Submitted By: Dan Nicholson <dnicholson at linuxfromscratch dot org>
2Date: 2006-08-01
3Initial Package Version: 2.6.12.0
4Origin: linux-2.6.16 series, syscalls diffed by Alexander Patrakov
5Upstream Status: Project is dead
6Description: Adds userspace headers and syscalls for inotify
7Testcase: dovecot-1.0rc2, ./configure --with-notify=inotify
8
9diff -pNur linux-libc-headers-2.6.12.0.orig/include/asm-i386/unistd.h linux-libc-headers-2.6.12.0/include/asm-i386/unistd.h
10--- linux-libc-headers-2.6.12.0.orig/include/asm-i386/unistd.h 2005-07-06 00:17:47.000000000 +0000
11+++ linux-libc-headers-2.6.12.0/include/asm-i386/unistd.h 2006-08-01 05:56:42.000000000 +0000
12@@ -294,8 +294,13 @@
13 #define __NR_add_key 286
14 #define __NR_request_key 287
15 #define __NR_keyctl 288
16+/* #define __NR_ioprio_set 289 */
17+/* #define __NR_ioprio_get 290 */
18+#define __NR_inotify_init 291
19+#define __NR_inotify_add_watch 292
20+#define __NR_inotify_rm_watch 293
21
22-#define NR_syscalls 289
23+#define NR_syscalls 294
24
25 /*
26 * user-visible error numbers are in the range -1 - -128: see
27diff -pNur linux-libc-headers-2.6.12.0.orig/include/asm-ppc/unistd.h linux-libc-headers-2.6.12.0/include/asm-ppc/unistd.h
28--- linux-libc-headers-2.6.12.0.orig/include/asm-ppc/unistd.h 2005-07-06 00:17:23.000000000 +0000
29+++ linux-libc-headers-2.6.12.0/include/asm-ppc/unistd.h 2006-08-01 05:56:42.000000000 +0000
30@@ -277,8 +277,13 @@
31 #define __NR_request_key 270
32 #define __NR_keyctl 271
33 #define __NR_waitid 272
34+/* #define __NR_ioprio_set 273 */
35+/* #define __NR_ioprio_get 274 */
36+#define __NR_inotify_init 275
37+#define __NR_inotify_add_watch 276
38+#define __NR_inotify_rm_watch 277
39
40-#define __NR_syscalls 273
41+#define __NR_syscalls 278
42
43 #define __NR(n) #n
44
45diff -pNur linux-libc-headers-2.6.12.0.orig/include/linux/inotify.h linux-libc-headers-2.6.12.0/include/linux/inotify.h
46--- linux-libc-headers-2.6.12.0.orig/include/linux/inotify.h 1970-01-01 00:00:00.000000000 +0000
47+++ linux-libc-headers-2.6.12.0/include/linux/inotify.h 2006-08-01 05:56:42.000000000 +0000
48@@ -0,0 +1,67 @@
49+/*
50+ * Inode based directory notification for Linux
51+ *
52+ * Copyright (C) 2005 John McCutchan
53+ */
54+
55+#ifndef _LINUX_INOTIFY_H
56+#define _LINUX_INOTIFY_H
57+
58+#include <linux/types.h>
59+
60+/*
61+ * struct inotify_event - structure read from the inotify device for each event
62+ *
63+ * When you are watching a directory, you will receive the filename for events
64+ * such as IN_CREATE, IN_DELETE, IN_OPEN, IN_CLOSE, ..., relative to the wd.
65+ */
66+struct inotify_event {
67+ __s32 wd; /* watch descriptor */
68+ __u32 mask; /* watch mask */
69+ __u32 cookie; /* cookie to synchronize two events */
70+ __u32 len; /* length (including nulls) of name */
71+ char name[0]; /* stub for possible name */
72+};
73+
74+/* the following are legal, implemented events that user-space can watch for */
75+#define IN_ACCESS 0x00000001 /* File was accessed */
76+#define IN_MODIFY 0x00000002 /* File was modified */
77+#define IN_ATTRIB 0x00000004 /* Metadata changed */
78+#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed */
79+#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed */
80+#define IN_OPEN 0x00000020 /* File was opened */
81+#define IN_MOVED_FROM 0x00000040 /* File was moved from X */
82+#define IN_MOVED_TO 0x00000080 /* File was moved to Y */
83+#define IN_CREATE 0x00000100 /* Subfile was created */
84+#define IN_DELETE 0x00000200 /* Subfile was deleted */
85+#define IN_DELETE_SELF 0x00000400 /* Self was deleted */
86+#define IN_MOVE_SELF 0x00000800 /* Self was moved */
87+
88+/* the following are legal events. they are sent as needed to any watch */
89+#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted */
90+#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed */
91+#define IN_IGNORED 0x00008000 /* File was ignored */
92+
93+/* helper events */
94+#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* close */
95+#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* moves */
96+
97+/* special flags */
98+#define IN_ONLYDIR 0x01000000 /* only watch the path if it is a directory */
99+#define IN_DONT_FOLLOW 0x02000000 /* don't follow a sym link */
100+#define IN_MASK_ADD 0x20000000 /* add to the mask of an already existing watch */
101+#define IN_ISDIR 0x40000000 /* event occurred against dir */
102+#define IN_ONESHOT 0x80000000 /* only send event once */
103+
104+/*
105+ * All of the events - we build the list by hand so that we can add flags in
106+ * the future and not break backward compatibility. Apps will get only the
107+ * events that they originally wanted. Be sure to add new events here!
108+ */
109+#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE | \
110+ IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM | \
111+ IN_MOVED_TO | IN_DELETE | IN_CREATE | IN_DELETE_SELF | \
112+ IN_MOVE_SELF)
113+
114+
115+#endif /* _LINUX_INOTIFY_H */