hwmon: Fix unchecked return status, batch 4
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / asm-um / unistd.h
blobafccfcaa9ea9228d0c744d371815266d7afe0233
1 /*
2 * Copyright (C) 2000 - 2004 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
6 #ifndef _UM_UNISTD_H_
7 #define _UM_UNISTD_H_
9 #include <linux/syscalls.h>
10 #include "linux/resource.h"
11 #include "asm/uaccess.h"
13 extern int um_execve(const char *file, char *const argv[], char *const env[]);
15 #ifdef __KERNEL__
16 /* We get __ARCH_WANT_OLD_STAT and __ARCH_WANT_STAT64 from the base arch */
17 #define __ARCH_WANT_IPC_PARSE_VERSION
18 #define __ARCH_WANT_OLD_READDIR
19 #define __ARCH_WANT_SYS_ALARM
20 #define __ARCH_WANT_SYS_GETHOSTNAME
21 #define __ARCH_WANT_SYS_PAUSE
22 #define __ARCH_WANT_SYS_SGETMASK
23 #define __ARCH_WANT_SYS_SIGNAL
24 #define __ARCH_WANT_SYS_TIME
25 #define __ARCH_WANT_SYS_UTIME
26 #define __ARCH_WANT_SYS_WAITPID
27 #define __ARCH_WANT_SYS_SOCKETCALL
28 #define __ARCH_WANT_SYS_FADVISE64
29 #define __ARCH_WANT_SYS_GETPGRP
30 #define __ARCH_WANT_SYS_LLSEEK
31 #define __ARCH_WANT_SYS_NICE
32 #define __ARCH_WANT_SYS_OLD_GETRLIMIT
33 #define __ARCH_WANT_SYS_OLDUMOUNT
34 #define __ARCH_WANT_SYS_SIGPENDING
35 #define __ARCH_WANT_SYS_SIGPROCMASK
36 #define __ARCH_WANT_SYS_RT_SIGACTION
37 #define __ARCH_WANT_SYS_RT_SIGSUSPEND
38 #endif
40 #ifdef __KERNEL_SYSCALLS__
42 #include <linux/compiler.h>
43 #include <linux/types.h>
45 static inline int execve(const char *filename, char *const argv[],
46 char *const envp[])
48 mm_segment_t fs;
49 int ret;
51 fs = get_fs();
52 set_fs(KERNEL_DS);
53 ret = um_execve(filename, argv, envp);
54 set_fs(fs);
56 if (ret >= 0)
57 return ret;
59 errno = -(long)ret;
60 return -1;
63 int sys_execve(char *file, char **argv, char **env);
65 #endif /* __KERNEL_SYSCALLS__ */
67 #undef __KERNEL_SYSCALLS__
68 #include "asm/arch/unistd.h"
70 #endif /* _UM_UNISTD_H_*/