mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/4] fs: fix return type of read
@ 2013-02-14 13:08 Alexander Aring
  2013-02-14 13:08 ` [PATCH 2/4] fs: add pread and pwrite functions Alexander Aring
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Alexander Aring @ 2013-02-14 13:08 UTC (permalink / raw)
  To: barebox

Use ssize_t instead of int. Similar write function
which uses ssize_t as return type, too.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 fs/fs.c      | 2 +-
 include/fs.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/fs.c b/fs/fs.c
index f840516..48d1c89 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -754,7 +754,7 @@ int ioctl(int fd, int request, void *buf)
 	return ret;
 }
 
-int read(int fd, void *buf, size_t count)
+ssize_t read(int fd, void *buf, size_t count)
 {
 	struct device_d *dev;
 	struct fs_driver_d *fsdrv;
diff --git a/include/fs.h b/include/fs.h
index 919daab..d6b22f7 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -113,7 +113,7 @@ int close(int fd);
 int flush(int fd);
 int lstat(const char *filename, struct stat *s);
 int stat(const char *filename, struct stat *s);
-int read(int fd, void *buf, size_t count);
+ssize_t read(int fd, void *buf, size_t count);
 int ioctl(int fd, int request, void *buf);
 ssize_t write(int fd, const void *buf, size_t count);
 
-- 
1.8.1.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-14 22:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-14 13:08 [PATCH 1/4] fs: fix return type of read Alexander Aring
2013-02-14 13:08 ` [PATCH 2/4] fs: add pread and pwrite functions Alexander Aring
2013-02-14 21:13   ` Sascha Hauer
2013-02-14 22:23     ` Alexander Aring
2013-02-14 13:08 ` [PATCH 3/4] nandtest: use new " Alexander Aring
2013-02-14 13:08 ` [PATCH 4/4] nandtest: fix length calculation Alexander Aring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox