diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-07-14 03:24:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-15 00:53:52 -0400 |
commit | 329c6e4257d6a89990d72617d91437e2ce59e426 (patch) | |
tree | 852cebffb7a48868c77d7857cda0c65dbf85de80 | |
parent | b076bb02ee2c489da36c89e35c640bfe45c7d27e (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>
-rw-r--r-- | arch/um/include/os.h | 68 |
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 | ||
66 | static inline struct openflags of_read(struct openflags flags) | 66 | static 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 | ||
72 | static inline struct openflags of_write(struct openflags flags) | 72 | static 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 | ||
78 | static inline struct openflags of_rdwr(struct openflags flags) | 78 | static 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 | ||
83 | static inline struct openflags of_set_rw(struct openflags flags, int r, int w) | 83 | static 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 | ||
90 | static inline struct openflags of_sync(struct openflags flags) | 90 | static 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 | ||
96 | static inline struct openflags of_create(struct openflags flags) | 96 | static 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 | ||
102 | static inline struct openflags of_trunc(struct openflags flags) | 102 | static 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 | ||
108 | static inline struct openflags of_append(struct openflags flags) | 108 | static 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 | ||
114 | static inline struct openflags of_excl(struct openflags flags) | 114 | static 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 | ||
120 | static inline struct openflags of_cloexec(struct openflags flags) | 120 | static 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 */ |
127 | extern int os_stat_file(const char *file_name, struct uml_stat *buf); | 127 | extern int os_stat_file(const char *file_name, struct uml_stat *buf); |
128 | extern int os_stat_fd(const int fd, struct uml_stat *buf); | 128 | extern 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 | ||
205 | extern int os_map_memory(void *virt, int fd, unsigned long long off, | 205 | extern 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); |
207 | extern int os_protect_memory(void *addr, unsigned long len, | 207 | extern int os_protect_memory(void *addr, unsigned long len, |
208 | int r, int w, int x); | 208 | int r, int w, int x); |
209 | extern int os_unmap_memory(void *addr, int len); | 209 | extern int os_unmap_memory(void *addr, int len); |
210 | extern int os_drop_memory(void *addr, int length); | 210 | extern int os_drop_memory(void *addr, int length); |