Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86313c48 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Jeremy Fitzhardinge
Browse files

usermodehelper: Tidy up waiting



Rather than using a tri-state integer for the wait flag in
call_usermodehelper_exec, define a proper enum, and use that.  I've
preserved the integer values so that any callers I've missed should
still work OK.

Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Joel Becker <joel.becker@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: David Howells <dhowells@redhat.com>
parent 10a0a8d4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ execute(const char *string)
		NULL,
	};

	if ((ret = call_usermodehelper(argv[0], argv, envp, 1)) != 0) {
	if ((ret = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC)) != 0) {
		printk(KERN_ERR "Voyager failed to run \"%s\": %i\n",
		       string, ret);
	}
+1 −1
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ static void do_mce_trigger(void)
	if (events != atomic_read(&mce_logged) && trigger[0]) {
		/* Small race window, but should be harmless.  */
		atomic_set(&mce_logged, events);
		call_usermodehelper(trigger, trigger_argv, NULL, -1);
		call_usermodehelper(trigger, trigger_argv, NULL, UMH_NO_WAIT);
	}
}

+2 −1
Original line number Diff line number Diff line
@@ -1770,7 +1770,8 @@ static int call_critical_overtemp(void)
				"PATH=/sbin:/usr/sbin:/bin:/usr/bin",
				NULL };

	return call_usermodehelper(critical_overtemp_path, argv, envp, 0);
	return call_usermodehelper(critical_overtemp_path,
				   argv, envp, UMH_WAIT_EXEC);
}


+2 −1
Original line number Diff line number Diff line
@@ -80,7 +80,8 @@ int wf_critical_overtemp(void)
				"PATH=/sbin:/usr/sbin:/bin:/usr/bin",
				NULL };

	return call_usermodehelper(critical_overtemp_path, argv, envp, 0);
	return call_usermodehelper(critical_overtemp_path,
				   argv, envp, UMH_WAIT_EXEC);
}
EXPORT_SYMBOL_GPL(wf_critical_overtemp);

+1 −1
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ static int eppconfig(struct baycom_state *bc)
	sprintf(portarg, "%ld", bc->pdev->port->base);
	printk(KERN_DEBUG "%s: %s -s -p %s -m %s\n", bc_drvname, eppconfig_path, portarg, modearg);

	return call_usermodehelper(eppconfig_path, argv, envp, 1);
	return call_usermodehelper(eppconfig_path, argv, envp, UMH_WAIT_PROC);
}

/* ---------------------------------------------------------------------- */
Loading