uml: change remaining callers of os_{read_write}_file
authorJeff Dike <jdike@addtoit.com>
Sun, 6 May 2007 21:51:41 +0000 (14:51 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 7 May 2007 19:13:03 +0000 (12:13 -0700)
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>
arch/um/drivers/chan_kern.c
arch/um/drivers/cow_sys.h
arch/um/drivers/net_user.c
arch/um/drivers/ubd_kern.c
arch/um/kernel/initrd.c
arch/um/kernel/physmem.c
arch/um/sys-i386/bugs.c

index 3aa351611763cbcf625f5cc6a09b4f4aad41ea5f..92e069e8253fd59a319017b9ea9870258f5c666b 100644 (file)
@@ -98,7 +98,7 @@ int generic_read(int fd, char *c_out, void *unused)
 {
        int n;
 
-       n = os_read_file(fd, c_out, sizeof(*c_out));
+       n = os_read_file_k(fd, c_out, sizeof(*c_out));
 
        if(n == -EAGAIN)
                return 0;
@@ -111,7 +111,7 @@ int generic_read(int fd, char *c_out, void *unused)
 
 int generic_write(int fd, const char *buf, int n, void *unused)
 {
-       return os_write_file(fd, buf, n);
+       return os_write_file_k(fd, buf, n);
 }
 
 int generic_window_size(int fd, void *unused, unsigned short *rows_out,
index c702943769cbc2148deafe737a08b351f84686ce..3255583eccba3e1f3de5764ff3d7e34fbb15b8db 100644 (file)
@@ -35,7 +35,7 @@ static inline int cow_file_size(char *file, unsigned long long *size_out)
 
 static inline int cow_write_file(int fd, void *buf, int size)
 {
-       return(os_write_file(fd, buf, size));
+       return(os_write_file_k(fd, buf, size));
 }
 
 #endif
index 2dc57a37e4b713f04e9b25e28ff156f7aa23cb2e..8bc6688c4f0fe91be5ef8a94ffe7cfaef57c8de1 100644 (file)
@@ -73,7 +73,7 @@ void read_output(int fd, char *output, int len)
 
        while(remain != 0){
                expected = (remain < len) ? remain : len;
-               ret = os_read_file(fd, output, expected);
+               ret = os_read_file_k(fd, output, expected);
                if (ret != expected) {
                        str = "data";
                        goto err;
@@ -94,7 +94,7 @@ int net_read(int fd, void *buf, int len)
 {
        int n;
 
-       n = os_read_file(fd,  buf,  len);
+       n = os_read_file_k(fd,  buf,  len);
 
        if(n == -EAGAIN)
                return 0;
@@ -122,7 +122,7 @@ int net_write(int fd, void *buf, int len)
 {
        int n;
 
-       n = os_write_file(fd, buf, len);
+       n = os_write_file_k(fd, buf, len);
 
        if(n == -EAGAIN)
                return 0;
index 88a246edb61eb00a9be6f6c1cde64c735f33cfbf..2a00203e10170b8cdf1c59a1c54ebc77cbca50e3 100644 (file)
@@ -1246,7 +1246,7 @@ int read_cow_bitmap(int fd, void *buf, int offset, int len)
        if(err < 0)
                return(err);
 
-       err = os_read_file(fd, buf, len);
+       err = os_read_file_k(fd, buf, len);
        if(err < 0)
                return(err);
 
index 6ab1539108e1738c8e8613763e3304c581682ebe..bf3dd9659865a4f12b689f1fe9d11e972d54cee7 100644 (file)
@@ -55,7 +55,7 @@ int load_initrd(char *filename, void *buf, int size)
                printk("Opening '%s' failed - err = %d\n", filename, -fd);
                return(-1);
        }
-       n = os_read_file(fd, buf, size);
+       n = os_read_file_k(fd, buf, size);
        if(n != size){
                printk("Read of %d bytes from '%s' failed, err = %d\n", size,
                       filename, -n);
index a9856209006b85c2e504080493bd5ed94d03afb3..77021a627da62a025489c46e0deae1722e675403 100644 (file)
@@ -211,7 +211,7 @@ void physmem_forget_descriptor(int fd)
                        panic("physmem_forget_descriptor - failed to seek "
                              "to %lld in fd %d, error = %d\n",
                              offset, fd, -err);
-               err = os_read_file(fd, addr, PAGE_SIZE);
+               err = os_read_file_k(fd, addr, PAGE_SIZE);
                if(err < 0)
                        panic("physmem_forget_descriptor - failed to read "
                              "from fd %d to 0x%p, error = %d\n",
index 74fd062b201b8ebe8e4717f2a00a7573de93a993..f5dfe49c84426c41b01c06d5439eb8ccc928fdc3 100644 (file)
@@ -28,7 +28,7 @@ static char token(int fd, char *buf, int len, char stop)
        ptr = buf;
        end = &buf[len];
        do {
-               n = os_read_file(fd, ptr, sizeof(*ptr));
+               n = os_read_file_k(fd, ptr, sizeof(*ptr));
                c = *ptr++;
                if(n != sizeof(*ptr)){
                        if(n == 0)