diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kmod.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index b087377ae2c4..dd99c329e161 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
| @@ -110,10 +110,27 @@ call_usermodehelper(char *path, char **argv, char **envp, int wait) | |||
| 110 | 110 | ||
| 111 | extern struct ctl_table usermodehelper_table[]; | 111 | extern struct ctl_table usermodehelper_table[]; |
| 112 | 112 | ||
| 113 | enum umh_disable_depth { | ||
| 114 | UMH_ENABLED = 0, | ||
| 115 | UMH_FREEZING, | ||
| 116 | UMH_DISABLED, | ||
| 117 | }; | ||
| 118 | |||
| 113 | extern void usermodehelper_init(void); | 119 | extern void usermodehelper_init(void); |
| 114 | 120 | ||
| 115 | extern int usermodehelper_disable(void); | 121 | extern int __usermodehelper_disable(enum umh_disable_depth depth); |
| 116 | extern void usermodehelper_enable(void); | 122 | extern void __usermodehelper_set_disable_depth(enum umh_disable_depth depth); |
| 123 | |||
| 124 | static inline int usermodehelper_disable(void) | ||
| 125 | { | ||
| 126 | return __usermodehelper_disable(UMH_DISABLED); | ||
| 127 | } | ||
| 128 | |||
| 129 | static inline void usermodehelper_enable(void) | ||
| 130 | { | ||
| 131 | __usermodehelper_set_disable_depth(UMH_ENABLED); | ||
| 132 | } | ||
| 133 | |||
| 117 | extern int usermodehelper_read_trylock(void); | 134 | extern int usermodehelper_read_trylock(void); |
| 118 | extern long usermodehelper_read_lock_wait(long timeout); | 135 | extern long usermodehelper_read_lock_wait(long timeout); |
| 119 | extern void usermodehelper_read_unlock(void); | 136 | extern void usermodehelper_read_unlock(void); |
