diff options
Diffstat (limited to 'arch/um/os-Linux/mem.c')
-rw-r--r-- | arch/um/os-Linux/mem.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c index f1ea169db85e..c6378c6d10d2 100644 --- a/arch/um/os-Linux/mem.c +++ b/arch/um/os-Linux/mem.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <sys/statfs.h> | 11 | #include <sys/statfs.h> |
12 | #include "kern_util.h" | 12 | #include "kern_util.h" |
13 | #include "user.h" | 13 | #include "user.h" |
14 | #include "user_util.h" | ||
15 | #include "mem_user.h" | 14 | #include "mem_user.h" |
16 | #include "init.h" | 15 | #include "init.h" |
17 | #include "os.h" | 16 | #include "os.h" |
@@ -165,7 +164,8 @@ found: | |||
165 | * (file: kernel/tt/ptproxy/proxy.c, proc: start_debugger). | 164 | * (file: kernel/tt/ptproxy/proxy.c, proc: start_debugger). |
166 | * So it isn't 'static' yet. | 165 | * So it isn't 'static' yet. |
167 | */ | 166 | */ |
168 | int make_tempfile(const char *template, char **out_tempname, int do_unlink) | 167 | int __init make_tempfile(const char *template, char **out_tempname, |
168 | int do_unlink) | ||
169 | { | 169 | { |
170 | char *tempname; | 170 | char *tempname; |
171 | int fd; | 171 | int fd; |
@@ -206,7 +206,7 @@ out: | |||
206 | * This proc is used in start_up.c | 206 | * This proc is used in start_up.c |
207 | * So it isn't 'static'. | 207 | * So it isn't 'static'. |
208 | */ | 208 | */ |
209 | int create_tmp_file(unsigned long long len) | 209 | int __init create_tmp_file(unsigned long long len) |
210 | { | 210 | { |
211 | int fd, err; | 211 | int fd, err; |
212 | char zero; | 212 | char zero; |
@@ -232,17 +232,16 @@ int create_tmp_file(unsigned long long len) | |||
232 | 232 | ||
233 | zero = 0; | 233 | zero = 0; |
234 | 234 | ||
235 | err = os_write_file(fd, &zero, 1); | 235 | err = write(fd, &zero, 1); |
236 | if(err != 1){ | 236 | if(err != 1){ |
237 | errno = -err; | 237 | perror("write"); |
238 | perror("os_write_file"); | ||
239 | exit(1); | 238 | exit(1); |
240 | } | 239 | } |
241 | 240 | ||
242 | return fd; | 241 | return fd; |
243 | } | 242 | } |
244 | 243 | ||
245 | int create_mem_file(unsigned long long len) | 244 | int __init create_mem_file(unsigned long long len) |
246 | { | 245 | { |
247 | int err, fd; | 246 | int err, fd; |
248 | 247 | ||
@@ -257,7 +256,7 @@ int create_mem_file(unsigned long long len) | |||
257 | } | 256 | } |
258 | 257 | ||
259 | 258 | ||
260 | void check_tmpexec(void) | 259 | void __init check_tmpexec(void) |
261 | { | 260 | { |
262 | void *addr; | 261 | void *addr; |
263 | int err, fd = create_tmp_file(UM_KERN_PAGE_SIZE); | 262 | int err, fd = create_tmp_file(UM_KERN_PAGE_SIZE); |