diff options
author | Arnd Bergmann <arnd@arndb.de> | 2006-10-02 05:18:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:23 -0400 |
commit | 3db03b4afb3ecd66a0399b8ba57742ca953b0ecd (patch) | |
tree | fe0bd5c3663c58583f0181e2673d569c2df664e7 /drivers | |
parent | 6760856791c6e527da678021ee6a67896549d4da (diff) |
[PATCH] rename the provided execve functions to kernel_execve
Some architectures provide an execve function that does not set errno, but
instead returns the result code directly. Rename these to kernel_execve to
get the right semantics there. Moreover, there is no reasone for any of these
architectures to still provide __KERNEL_SYSCALLS__ or _syscallN macros, so
remove these right away.
[akpm@osdl.org: build fix]
[bunk@stusta.de: build fix]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Andi Kleen <ak@muc.de>
Acked-by: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Hirokazu Takata <takata.hirokazu@renesas.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
Cc: Richard Curnow <rc@rc0.org.uk>
Cc: William Lee Irwin III <wli@holomorphy.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Cc: Chris Zankel <chris@zankel.net>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/sbus/char/bbc_envctrl.c | 5 | ||||
-rw-r--r-- | drivers/sbus/char/envctrl.c | 7 |
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c index 1cc706e11119..d27e4f6d7045 100644 --- a/drivers/sbus/char/bbc_envctrl.c +++ b/drivers/sbus/char/bbc_envctrl.c | |||
@@ -4,9 +4,6 @@ | |||
4 | * Copyright (C) 2001 David S. Miller (davem@redhat.com) | 4 | * Copyright (C) 2001 David S. Miller (davem@redhat.com) |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #define __KERNEL_SYSCALLS__ | ||
8 | static int errno; | ||
9 | |||
10 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
11 | #include <linux/kthread.h> | 8 | #include <linux/kthread.h> |
12 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
@@ -200,7 +197,7 @@ static void do_envctrl_shutdown(struct bbc_cpu_temperature *tp) | |||
200 | printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n"); | 197 | printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n"); |
201 | 198 | ||
202 | shutting_down = 1; | 199 | shutting_down = 1; |
203 | if (execve("/sbin/shutdown", argv, envp) < 0) | 200 | if (kernel_execve("/sbin/shutdown", argv, envp) < 0) |
204 | printk(KERN_CRIT "envctrl: shutdown execution failed\n"); | 201 | printk(KERN_CRIT "envctrl: shutdown execution failed\n"); |
205 | } | 202 | } |
206 | 203 | ||
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index 063e676a3ac0..728a133d0fc5 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
@@ -19,9 +19,6 @@ | |||
19 | * Daniele Bellucci <bellucda@tiscali.it> | 19 | * Daniele Bellucci <bellucda@tiscali.it> |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define __KERNEL_SYSCALLS__ | ||
23 | static int errno; | ||
24 | |||
25 | #include <linux/module.h> | 22 | #include <linux/module.h> |
26 | #include <linux/sched.h> | 23 | #include <linux/sched.h> |
27 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
@@ -976,13 +973,15 @@ static void envctrl_do_shutdown(void) | |||
976 | "HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL }; | 973 | "HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL }; |
977 | char *argv[] = { | 974 | char *argv[] = { |
978 | "/sbin/shutdown", "-h", "now", NULL }; | 975 | "/sbin/shutdown", "-h", "now", NULL }; |
976 | int ret; | ||
979 | 977 | ||
980 | if (inprog != 0) | 978 | if (inprog != 0) |
981 | return; | 979 | return; |
982 | 980 | ||
983 | inprog = 1; | 981 | inprog = 1; |
984 | printk(KERN_CRIT "kenvctrld: WARNING: Shutting down the system now.\n"); | 982 | printk(KERN_CRIT "kenvctrld: WARNING: Shutting down the system now.\n"); |
985 | if (0 > execve("/sbin/shutdown", argv, envp)) { | 983 | ret = kernel_execve("/sbin/shutdown", argv, envp); |
984 | if (ret < 0) { | ||
986 | printk(KERN_CRIT "kenvctrld: WARNING: system shutdown failed!\n"); | 985 | printk(KERN_CRIT "kenvctrld: WARNING: system shutdown failed!\n"); |
987 | inprog = 0; /* unlikely to succeed, but we could try again */ | 986 | inprog = 0; /* unlikely to succeed, but we could try again */ |
988 | } | 987 | } |