Skip to content

Commit

Permalink
[SPARC] {bbc_,}envctrl: Use call_usermodehelper().
Browse files Browse the repository at this point in the history
We should not be calling kernel_execve() directly and this
causes module build failures because kernel_execve() is not
exported to modules.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Oct 18, 2006
1 parent b48194b commit 872ec64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/sbus/char/bbc_envctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

#include <linux/kthread.h>
#include <linux/syscalls.h>
#include <linux/delay.h>
#include <linux/kmod.h>
#include <asm/oplib.h>
#include <asm/ebus.h>

Expand Down Expand Up @@ -195,7 +195,7 @@ static void do_envctrl_shutdown(struct bbc_cpu_temperature *tp)
printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n");

shutting_down = 1;
if (kernel_execve("/sbin/shutdown", argv, envp) < 0)
if (call_usermodehelper("/sbin/shutdown", argv, envp, 0) < 0)
printk(KERN_CRIT "envctrl: shutdown execution failed\n");
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/sbus/char/envctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/miscdevice.h>
#include <linux/syscalls.h>
#include <linux/kmod.h>

#include <asm/ebus.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -976,7 +976,7 @@ static void envctrl_do_shutdown(void)

inprog = 1;
printk(KERN_CRIT "kenvctrld: WARNING: Shutting down the system now.\n");
ret = kernel_execve("/sbin/shutdown", argv, envp);
ret = call_usermodehelper("/sbin/shutdown", argv, envp, 0);
if (ret < 0) {
printk(KERN_CRIT "kenvctrld: WARNING: system shutdown failed!\n");
inprog = 0; /* unlikely to succeed, but we could try again */
Expand Down

0 comments on commit 872ec64

Please sign in to comment.