summaryrefslogtreecommitdiff
path: root/include/linux/kmod.h
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2012-03-24 02:02:48 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-24 03:58:41 +0400
commit9d944ef32e83405a07376f112e9f02161d3e9731 (patch)
tree24170ff64fb83221da133e2afb53f58e840a6eee /include/linux/kmod.h
parentd0bd587a80960d7ba7e0c8396e154028c9045c54 (diff)
downloadlinux-9d944ef32e83405a07376f112e9f02161d3e9731.tar.xz
usermodehelper: kill umh_wait, renumber UMH_* constants
No functional changes. It is not sane to use UMH_KILLABLE with enum umh_wait, but obviously we do not want another argument in call_usermodehelper_* helpers. Kill this enum, use the plain int. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Tejun Heo <tj@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kmod.h')
-rw-r--r--include/linux/kmod.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 1b5985855ffc..9efeae679106 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -48,12 +48,9 @@ static inline int request_module_nowait(const char *name, ...) { return -ENOSYS;
struct cred;
struct file;
-enum umh_wait {
- UMH_NO_WAIT = -1, /* don't wait at all */
- UMH_WAIT_EXEC = 0, /* wait for the exec, but not the process */
- UMH_WAIT_PROC = 1, /* wait for the process to complete */
-};
-
+#define UMH_NO_WAIT 0 /* don't wait at all */
+#define UMH_WAIT_EXEC 1 /* wait for the exec, but not the process */
+#define UMH_WAIT_PROC 2 /* wait for the process to complete */
#define UMH_KILLABLE 4 /* wait for EXEC/PROC killable */
struct subprocess_info {
@@ -62,7 +59,7 @@ struct subprocess_info {
char *path;
char **argv;
char **envp;
- enum umh_wait wait;
+ int wait;
int retval;
int (*init)(struct subprocess_info *info, struct cred *new);
void (*cleanup)(struct subprocess_info *info);
@@ -80,15 +77,14 @@ void call_usermodehelper_setfns(struct subprocess_info *info,
void *data);
/* Actually execute the sub-process */
-int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait);
+int call_usermodehelper_exec(struct subprocess_info *info, int wait);
/* Free the subprocess_info. This is only needed if you're not going
to call call_usermodehelper_exec */
void call_usermodehelper_freeinfo(struct subprocess_info *info);
static inline int
-call_usermodehelper_fns(char *path, char **argv, char **envp,
- enum umh_wait wait,
+call_usermodehelper_fns(char *path, char **argv, char **envp, int wait,
int (*init)(struct subprocess_info *info, struct cred *new),
void (*cleanup)(struct subprocess_info *), void *data)
{
@@ -106,7 +102,7 @@ call_usermodehelper_fns(char *path, char **argv, char **envp,
}
static inline int
-call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait)
+call_usermodehelper(char *path, char **argv, char **envp, int wait)
{
return call_usermodehelper_fns(path, argv, envp, wait,
NULL, NULL, NULL);