aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/notifier.h
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-10-27 18:15:57 -0400
committerMichal Marek <mmarek@suse.cz>2010-10-27 18:15:57 -0400
commitb74b953b998bcc2db91b694446f3a2619ec32de6 (patch)
tree6ce24caabd730f6ae9287ed0676ec32e6ff31e9d /include/linux/notifier.h
parentabb438526201c6a79949ad45375c051b6681c253 (diff)
parentf6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff)
Merge commit 'v2.6.36' into kbuild/misc
Update to be able to fix a recent change to scripts/basic/docproc.c (commit eda603f).
Diffstat (limited to 'include/linux/notifier.h')
-rw-r--r--include/linux/notifier.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index fee6c2f68075..b2f1a4d83550 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -164,7 +164,10 @@ extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh,
164/* Encapsulate (negative) errno value (in particular, NOTIFY_BAD <=> EPERM). */ 164/* Encapsulate (negative) errno value (in particular, NOTIFY_BAD <=> EPERM). */
165static inline int notifier_from_errno(int err) 165static inline int notifier_from_errno(int err)
166{ 166{
167 return NOTIFY_STOP_MASK | (NOTIFY_OK - err); 167 if (err)
168 return NOTIFY_STOP_MASK | (NOTIFY_OK - err);
169
170 return NOTIFY_OK;
168} 171}
169 172
170/* Restore (negative) errno value from notify return value. */ 173/* Restore (negative) errno value from notify return value. */
@@ -182,7 +185,10 @@ static inline int notifier_to_errno(int ret)
182 * VC switch chains (for loadable kernel svgalib VC switch helpers) etc... 185 * VC switch chains (for loadable kernel svgalib VC switch helpers) etc...
183 */ 186 */
184 187
185/* netdevice notifier chain */ 188/* netdevice notifier chain. Please remember to update the rtnetlink
189 * notification exclusion list in rtnetlink_event() when adding new
190 * types.
191 */
186#define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */ 192#define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */
187#define NETDEV_DOWN 0x0002 193#define NETDEV_DOWN 0x0002
188#define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface 194#define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface
@@ -199,10 +205,12 @@ static inline int notifier_to_errno(int ret)
199#define NETDEV_FEAT_CHANGE 0x000B 205#define NETDEV_FEAT_CHANGE 0x000B
200#define NETDEV_BONDING_FAILOVER 0x000C 206#define NETDEV_BONDING_FAILOVER 0x000C
201#define NETDEV_PRE_UP 0x000D 207#define NETDEV_PRE_UP 0x000D
202#define NETDEV_BONDING_OLDTYPE 0x000E 208#define NETDEV_PRE_TYPE_CHANGE 0x000E
203#define NETDEV_BONDING_NEWTYPE 0x000F 209#define NETDEV_POST_TYPE_CHANGE 0x000F
204#define NETDEV_POST_INIT 0x0010 210#define NETDEV_POST_INIT 0x0010
205#define NETDEV_UNREGISTER_BATCH 0x0011 211#define NETDEV_UNREGISTER_BATCH 0x0011
212#define NETDEV_BONDING_DESLAVE 0x0012
213#define NETDEV_NOTIFY_PEERS 0x0013
206 214
207#define SYS_DOWN 0x0001 /* Notify of system down */ 215#define SYS_DOWN 0x0001 /* Notify of system down */
208#define SYS_RESTART SYS_DOWN 216#define SYS_RESTART SYS_DOWN