diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-10-16 04:27:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:06 -0400 |
commit | 512b6fb1c14d4c34f23a3419b0789ad01914a899 (patch) | |
tree | 29e51c256dde41db297cff28767bf4dc4a1dc73f /arch/um/os-Linux/helper.c | |
parent | b21d4b08b6686fa13bf9d4cae1ae08cb23ea3d53 (diff) |
uml: userspace files should call libc directly
A number of files that were changed in the recent removal of tt mode
are userspace files which call the os_* wrappers instead of calling
libc directly. A few other files were affected by this, through
This patch makes these call glibc directly.
There are also style fixes in the affected areas.
os_print_error has no remaining callers, so it is deleted.
There is a interface change to os_set_exec_close, eliminating a
parameter which was always the same. The callers are fixed as well.
os_process_pc got its error path cleaned up.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/os-Linux/helper.c')
-rw-r--r-- | arch/um/os-Linux/helper.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c index d81af7b8587a..7a72dbb61b0d 100644 --- a/arch/um/os-Linux/helper.c +++ b/arch/um/os-Linux/helper.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <limits.h> | 11 | #include <limits.h> |
12 | #include <sys/signal.h> | 12 | #include <sys/signal.h> |
13 | #include <sys/wait.h> | 13 | #include <sys/wait.h> |
14 | #include <sys/socket.h> | ||
14 | #include "user.h" | 15 | #include "user.h" |
15 | #include "kern_util.h" | 16 | #include "kern_util.h" |
16 | #include "os.h" | 17 | #include "os.h" |
@@ -54,13 +55,14 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv) | |||
54 | if (stack == 0) | 55 | if (stack == 0) |
55 | return -ENOMEM; | 56 | return -ENOMEM; |
56 | 57 | ||
57 | ret = os_pipe(fds, 1, 0); | 58 | ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fds); |
58 | if (ret < 0) { | 59 | if (ret < 0) { |
59 | printk("run_helper : pipe failed, ret = %d\n", -ret); | 60 | ret = -errno; |
61 | printk("run_helper : pipe failed, errno = %d\n", errno); | ||
60 | goto out_free; | 62 | goto out_free; |
61 | } | 63 | } |
62 | 64 | ||
63 | ret = os_set_exec_close(fds[1], 1); | 65 | ret = os_set_exec_close(fds[1]); |
64 | if (ret < 0) { | 66 | if (ret < 0) { |
65 | printk("run_helper : setting FD_CLOEXEC failed, ret = %d\n", | 67 | printk("run_helper : setting FD_CLOEXEC failed, ret = %d\n", |
66 | -ret); | 68 | -ret); |