From: Alexander Aring <alex.aring@gmail.com>
To: barebox@lists.infradead.org
Subject: [RFC 2/3] fs: read: handle zero files
Date: Fri, 28 Feb 2014 08:44:27 +0100 [thread overview]
Message-ID: <1393573468-31105-3-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1393573468-31105-1-git-send-email-alex.aring@gmail.com>
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
fs/fs.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/fs.c b/fs/fs.c
index 1b43c61..9584495 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -804,9 +804,6 @@ static ssize_t __read(FILE *f, void *buf, size_t count)
if (f->size != FILE_SIZE_STREAM && f->pos + count > f->size)
count = f->size - f->pos;
- if (!count)
- return 0;
-
ret = fsdrv->read(dev, f, buf, count);
if (ret < 0)
--
1.9.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-02-28 7:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 7:44 [RFC 0/3] current read implementation and POSIX Alexander Aring
2014-02-28 7:44 ` [RFC 1/3] ramfs: add foofs for testing Alexander Aring
2014-02-28 7:56 ` Alexander Aring
2014-03-03 8:36 ` Sascha Hauer
2014-03-03 9:08 ` Alexander Aring
2014-02-28 7:44 ` Alexander Aring [this message]
2014-02-28 7:44 ` [RFC 3/3] libbb: read_full: use read return instead size Alexander Aring
2014-02-28 8:03 ` Alexander Aring
2014-02-28 14:21 ` Sascha Hauer
2014-02-28 17:12 ` Alexander Aring
2014-02-28 17:58 ` Alexander Aring
2014-03-03 8:30 ` Sascha Hauer
2014-03-03 9:04 ` Alexander Aring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1393573468-31105-3-git-send-email-alex.aring@gmail.com \
--to=alex.aring@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox