From 5134d8fea06ab51459fd095d091d1e6f73a44553 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Fri, 8 Feb 2008 04:22:08 -0800 Subject: uml: style fixes in arch/um/os-Linux Style changes under arch/um/os-Linux: include trimming CodingStyle fixes some printks needed severity indicators make_tempfile turns out not to be used outside of mem.c, so it is now static. Its declaration in tempfile.h is no longer needed, and tempfile.h itself is no longer needed. create_tmp_file was also made static. checkpatch moans about an EXPORT_SYMBOL in user_syms.c which is part of a macro definition - this is copying a bit of kernel infrastructure into the libc side of UML because the kernel headers can't be included there. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/os-Linux/util.c | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) (limited to 'arch/um/os-Linux/util.c') diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c index a6f31d47699..6ea77979531 100644 --- a/arch/um/os-Linux/util.c +++ b/arch/um/os-Linux/util.c @@ -1,39 +1,24 @@ /* - * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #include #include -#include -#include -#include -#include -#include -#include -#include -#include "asm/types.h" -#include -#include -#include #include -#include -#include -#include +#include #include -#include "kern_util.h" -#include "user.h" -#include "mem_user.h" -#include "init.h" -#include "ptrace_user.h" -#include "uml-config.h" -#include "os.h" -#include "longjmp.h" +#include +#include +#include +#include #include "kern_constants.h" +#include "os.h" +#include "user.h" void stack_protections(unsigned long address) { - if(mprotect((void *) address, UM_THREAD_SIZE, + if (mprotect((void *) address, UM_THREAD_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC) < 0) panic("protecting stack failed, errno = %d", errno); } @@ -44,17 +29,19 @@ int raw(int fd) int err; CATCH_EINTR(err = tcgetattr(fd, &tt)); - if(err < 0) + if (err < 0) return -errno; cfmakeraw(&tt); CATCH_EINTR(err = tcsetattr(fd, TCSADRAIN, &tt)); - if(err < 0) + if (err < 0) return -errno; - /* XXX tcsetattr could have applied only some changes - * (and cfmakeraw() is a set of changes) */ + /* + * XXX tcsetattr could have applied only some changes + * (and cfmakeraw() is a set of changes) + */ return 0; } -- cgit v1.2.3-70-g09d2