aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-05-06 17:51:41 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:13:03 -0400
commitfda83a99b2b49016b9d7ed562745969db25c4ef9 (patch)
tree45b6282e98841b8d608523a1df57d4a4c51c6965 /arch
parent77f6af778dc23514d897f4fdc7935329285ecb1b (diff)
uml: change remaining callers of os_{read_write}_file
Convert all remaining os_{read_write}_file users to use the simple {read,write} wrappers, os_{read_write}_file_k. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/drivers/chan_kern.c4
-rw-r--r--arch/um/drivers/cow_sys.h2
-rw-r--r--arch/um/drivers/net_user.c6
-rw-r--r--arch/um/drivers/ubd_kern.c2
-rw-r--r--arch/um/kernel/initrd.c2
-rw-r--r--arch/um/kernel/physmem.c2
-rw-r--r--arch/um/sys-i386/bugs.c2
7 files changed, 10 insertions, 10 deletions
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index 3aa351611763..92e069e8253f 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -98,7 +98,7 @@ int generic_read(int fd, char *c_out, void *unused)
98{ 98{
99 int n; 99 int n;
100 100
101 n = os_read_file(fd, c_out, sizeof(*c_out)); 101 n = os_read_file_k(fd, c_out, sizeof(*c_out));
102 102
103 if(n == -EAGAIN) 103 if(n == -EAGAIN)
104 return 0; 104 return 0;
@@ -111,7 +111,7 @@ int generic_read(int fd, char *c_out, void *unused)
111 111
112int generic_write(int fd, const char *buf, int n, void *unused) 112int generic_write(int fd, const char *buf, int n, void *unused)
113{ 113{
114 return os_write_file(fd, buf, n); 114 return os_write_file_k(fd, buf, n);
115} 115}
116 116
117int generic_window_size(int fd, void *unused, unsigned short *rows_out, 117int generic_window_size(int fd, void *unused, unsigned short *rows_out,
diff --git a/arch/um/drivers/cow_sys.h b/arch/um/drivers/cow_sys.h
index c702943769cb..3255583eccba 100644
--- a/arch/um/drivers/cow_sys.h
+++ b/arch/um/drivers/cow_sys.h
@@ -35,7 +35,7 @@ static inline int cow_file_size(char *file, unsigned long long *size_out)
35 35
36static inline int cow_write_file(int fd, void *buf, int size) 36static inline int cow_write_file(int fd, void *buf, int size)
37{ 37{
38 return(os_write_file(fd, buf, size)); 38 return(os_write_file_k(fd, buf, size));
39} 39}
40 40
41#endif 41#endif
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c
index 2dc57a37e4b7..8bc6688c4f0f 100644
--- a/arch/um/drivers/net_user.c
+++ b/arch/um/drivers/net_user.c
@@ -73,7 +73,7 @@ void read_output(int fd, char *output, int len)
73 73
74 while(remain != 0){ 74 while(remain != 0){
75 expected = (remain < len) ? remain : len; 75 expected = (remain < len) ? remain : len;
76 ret = os_read_file(fd, output, expected); 76 ret = os_read_file_k(fd, output, expected);
77 if (ret != expected) { 77 if (ret != expected) {
78 str = "data"; 78 str = "data";
79 goto err; 79 goto err;
@@ -94,7 +94,7 @@ int net_read(int fd, void *buf, int len)
94{ 94{
95 int n; 95 int n;
96 96
97 n = os_read_file(fd, buf, len); 97 n = os_read_file_k(fd, buf, len);
98 98
99 if(n == -EAGAIN) 99 if(n == -EAGAIN)
100 return 0; 100 return 0;
@@ -122,7 +122,7 @@ int net_write(int fd, void *buf, int len)
122{ 122{
123 int n; 123 int n;
124 124
125 n = os_write_file(fd, buf, len); 125 n = os_write_file_k(fd, buf, len);
126 126
127 if(n == -EAGAIN) 127 if(n == -EAGAIN)
128 return 0; 128 return 0;
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 88a246edb61e..2a00203e1017 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -1246,7 +1246,7 @@ int read_cow_bitmap(int fd, void *buf, int offset, int len)
1246 if(err < 0) 1246 if(err < 0)
1247 return(err); 1247 return(err);
1248 1248
1249 err = os_read_file(fd, buf, len); 1249 err = os_read_file_k(fd, buf, len);
1250 if(err < 0) 1250 if(err < 0)
1251 return(err); 1251 return(err);
1252 1252
diff --git a/arch/um/kernel/initrd.c b/arch/um/kernel/initrd.c
index 6ab1539108e1..bf3dd9659865 100644
--- a/arch/um/kernel/initrd.c
+++ b/arch/um/kernel/initrd.c
@@ -55,7 +55,7 @@ int load_initrd(char *filename, void *buf, int size)
55 printk("Opening '%s' failed - err = %d\n", filename, -fd); 55 printk("Opening '%s' failed - err = %d\n", filename, -fd);
56 return(-1); 56 return(-1);
57 } 57 }
58 n = os_read_file(fd, buf, size); 58 n = os_read_file_k(fd, buf, size);
59 if(n != size){ 59 if(n != size){
60 printk("Read of %d bytes from '%s' failed, err = %d\n", size, 60 printk("Read of %d bytes from '%s' failed, err = %d\n", size,
61 filename, -n); 61 filename, -n);
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c
index a9856209006b..77021a627da6 100644
--- a/arch/um/kernel/physmem.c
+++ b/arch/um/kernel/physmem.c
@@ -211,7 +211,7 @@ void physmem_forget_descriptor(int fd)
211 panic("physmem_forget_descriptor - failed to seek " 211 panic("physmem_forget_descriptor - failed to seek "
212 "to %lld in fd %d, error = %d\n", 212 "to %lld in fd %d, error = %d\n",
213 offset, fd, -err); 213 offset, fd, -err);
214 err = os_read_file(fd, addr, PAGE_SIZE); 214 err = os_read_file_k(fd, addr, PAGE_SIZE);
215 if(err < 0) 215 if(err < 0)
216 panic("physmem_forget_descriptor - failed to read " 216 panic("physmem_forget_descriptor - failed to read "
217 "from fd %d to 0x%p, error = %d\n", 217 "from fd %d to 0x%p, error = %d\n",
diff --git a/arch/um/sys-i386/bugs.c b/arch/um/sys-i386/bugs.c
index 74fd062b201b..f5dfe49c8442 100644
--- a/arch/um/sys-i386/bugs.c
+++ b/arch/um/sys-i386/bugs.c
@@ -28,7 +28,7 @@ static char token(int fd, char *buf, int len, char stop)
28 ptr = buf; 28 ptr = buf;
29 end = &buf[len]; 29 end = &buf[len];
30 do { 30 do {
31 n = os_read_file(fd, ptr, sizeof(*ptr)); 31 n = os_read_file_k(fd, ptr, sizeof(*ptr));
32 c = *ptr++; 32 c = *ptr++;
33 if(n != sizeof(*ptr)){ 33 if(n != sizeof(*ptr)){
34 if(n == 0) 34 if(n == 0)