aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-07-14 03:24:03 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-15 00:53:52 -0400
commit329c6e4257d6a89990d72617d91437e2ce59e426 (patch)
tree852cebffb7a48868c77d7857cda0c65dbf85de80 /arch
parentb076bb02ee2c489da36c89e35c640bfe45c7d27e (diff)
[PATCH] uml: header formatting cleanups
Clean up whitespace and return syntax in os.h. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/include/os.h68
1 files changed, 34 insertions, 34 deletions
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index b6c52496e15a..5316e8a4a4fd 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) 2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
@@ -15,9 +15,9 @@
15#include "irq_user.h" 15#include "irq_user.h"
16#include "sysdep/tls.h" 16#include "sysdep/tls.h"
17 17
18#define OS_TYPE_FILE 1 18#define OS_TYPE_FILE 1
19#define OS_TYPE_DIR 2 19#define OS_TYPE_DIR 2
20#define OS_TYPE_SYMLINK 3 20#define OS_TYPE_SYMLINK 3
21#define OS_TYPE_CHARDEV 4 21#define OS_TYPE_CHARDEV 4
22#define OS_TYPE_BLOCKDEV 5 22#define OS_TYPE_BLOCKDEV 5
23#define OS_TYPE_FIFO 6 23#define OS_TYPE_FIFO 6
@@ -61,68 +61,68 @@ struct openflags {
61}; 61};
62 62
63#define OPENFLAGS() ((struct openflags) { .r = 0, .w = 0, .s = 0, .c = 0, \ 63#define OPENFLAGS() ((struct openflags) { .r = 0, .w = 0, .s = 0, .c = 0, \
64 .t = 0, .a = 0, .e = 0, .cl = 0 }) 64 .t = 0, .a = 0, .e = 0, .cl = 0 })
65 65
66static inline struct openflags of_read(struct openflags flags) 66static inline struct openflags of_read(struct openflags flags)
67{ 67{
68 flags.r = 1; 68 flags.r = 1;
69 return(flags); 69 return flags;
70} 70}
71 71
72static inline struct openflags of_write(struct openflags flags) 72static inline struct openflags of_write(struct openflags flags)
73{ 73{
74 flags.w = 1; 74 flags.w = 1;
75 return(flags); 75 return flags;
76} 76}
77 77
78static inline struct openflags of_rdwr(struct openflags flags) 78static inline struct openflags of_rdwr(struct openflags flags)
79{ 79{
80 return(of_read(of_write(flags))); 80 return of_read(of_write(flags));
81} 81}
82 82
83static inline struct openflags of_set_rw(struct openflags flags, int r, int w) 83static inline struct openflags of_set_rw(struct openflags flags, int r, int w)
84{ 84{
85 flags.r = r; 85 flags.r = r;
86 flags.w = w; 86 flags.w = w;
87 return(flags); 87 return flags;
88} 88}
89 89
90static inline struct openflags of_sync(struct openflags flags) 90static inline struct openflags of_sync(struct openflags flags)
91{ 91{
92 flags.s = 1; 92 flags.s = 1;
93 return(flags); 93 return flags;
94} 94}
95 95
96static inline struct openflags of_create(struct openflags flags) 96static inline struct openflags of_create(struct openflags flags)
97{ 97{
98 flags.c = 1; 98 flags.c = 1;
99 return(flags); 99 return flags;
100} 100}
101 101
102static inline struct openflags of_trunc(struct openflags flags) 102static inline struct openflags of_trunc(struct openflags flags)
103{ 103{
104 flags.t = 1; 104 flags.t = 1;
105 return(flags); 105 return flags;
106} 106}
107 107
108static inline struct openflags of_append(struct openflags flags) 108static inline struct openflags of_append(struct openflags flags)
109{ 109{
110 flags.a = 1; 110 flags.a = 1;
111 return(flags); 111 return flags;
112} 112}
113 113
114static inline struct openflags of_excl(struct openflags flags) 114static inline struct openflags of_excl(struct openflags flags)
115{ 115{
116 flags.e = 1; 116 flags.e = 1;
117 return(flags); 117 return flags;
118} 118}
119 119
120static inline struct openflags of_cloexec(struct openflags flags) 120static inline struct openflags of_cloexec(struct openflags flags)
121{ 121{
122 flags.cl = 1; 122 flags.cl = 1;
123 return(flags); 123 return flags;
124} 124}
125 125
126/* file.c */ 126/* file.c */
127extern int os_stat_file(const char *file_name, struct uml_stat *buf); 127extern int os_stat_file(const char *file_name, struct uml_stat *buf);
128extern int os_stat_fd(const int fd, struct uml_stat *buf); 128extern int os_stat_fd(const int fd, struct uml_stat *buf);
@@ -204,7 +204,7 @@ extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr);
204 204
205extern int os_map_memory(void *virt, int fd, unsigned long long off, 205extern int os_map_memory(void *virt, int fd, unsigned long long off,
206 unsigned long len, int r, int w, int x); 206 unsigned long len, int r, int w, int x);
207extern int os_protect_memory(void *addr, unsigned long len, 207extern int os_protect_memory(void *addr, unsigned long len,
208 int r, int w, int x); 208 int r, int w, int x);
209extern int os_unmap_memory(void *addr, int len); 209extern int os_unmap_memory(void *addr, int len);
210extern int os_drop_memory(void *addr, int length); 210extern int os_drop_memory(void *addr, int length);