From 512b6fb1c14d4c34f23a3419b0789ad01914a899 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Tue, 16 Oct 2007 01:27:11 -0700 Subject: 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/os-Linux/helper.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'arch/um/os-Linux/helper.c') 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 @@ #include #include #include +#include #include "user.h" #include "kern_util.h" #include "os.h" @@ -54,13 +55,14 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv) if (stack == 0) return -ENOMEM; - ret = os_pipe(fds, 1, 0); + ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fds); if (ret < 0) { - printk("run_helper : pipe failed, ret = %d\n", -ret); + ret = -errno; + printk("run_helper : pipe failed, errno = %d\n", errno); goto out_free; } - ret = os_set_exec_close(fds[1], 1); + ret = os_set_exec_close(fds[1]); if (ret < 0) { printk("run_helper : setting FD_CLOEXEC failed, ret = %d\n", -ret); -- cgit v1.2.3