/* This is a simple wrapper which executes a usermode-helper function with a pipe as stdin. It is implemented entirely in terms of lower-level call_usermodehelper_* functions.  */
int call_usermodehelper_pipe(char *path, char **argv, char **envp, struct file **filp)
/* This is a simple wrapper which executes a usermode-helper function with a pipe as stdin. It is implemented entirely in terms of lower-level call_usermodehelper_* functions.  */
int call_usermodehelper_pipe(char *path, char **argv, char **envp, struct file **filp)
{
	struct subprocess_info *sub_info;
	int ret;
	sub_info = call_usermodehelper_setup(path, argv, envp, GFP_KERNEL);
	if (sub_info == NULL)
		return -ENOMEM;
	ret = call_usermodehelper_stdinpipe(sub_info, filp);
	if (ret < 0) {
		call_usermodehelper_freeinfo(sub_info);
		return ret;
	}
	ret = call_usermodehelper_exec(sub_info, UMH_WAIT_EXEC);
	if (ret < 0)
		filp_close(*filp, NULL);
	return ret;
}