[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH] libc: Fix fuer pread



! libc: pread() sollte lesen, nicht schreiben

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
---
 src/modules/lib/posix/posix_files.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/modules/lib/posix/posix_files.c b/src/modules/lib/posix/posix_files.c
index 15673fd..c7e6d38 100644
--- a/src/modules/lib/posix/posix_files.c
+++ b/src/modules/lib/posix/posix_files.c
@@ -445,7 +445,7 @@ ssize_t pread(int fd, void *buf, size_t count, off_t offset)
         return -1;
     }
 
-    ret = fwrite(buf, count, 1, file);
+    ret = fread(buf, count, 1, file);
 
     if (fseek(file, old_pos, SEEK_SET)) {
         return -1;
-- 
1.6.0.2