mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC 3/3] libbb: read_full: use read return instead size
Date: Mon, 3 Mar 2014 10:04:13 +0100	[thread overview]
Message-ID: <20140303090411.GA24214@x61s.Speedport_W_921V_1_24_000> (raw)
In-Reply-To: <20140303083050.GM17250@pengutronix.de>

Hi Sascha,

On Mon, Mar 03, 2014 at 09:30:50AM +0100, Sascha Hauer wrote:
> 
> So our read_file implementation doesn't work procfs like filesystems where
> all sizes are 0. Your patch doesn't change this though. In 2/3 you
> remove the if (!size) check and call the fs drivers read function with
> size 0. In this case the read function may return values, but never
> actually read something because the buffer size is 0.
> 
exactly. The imporant question for me is "do you want to accept patches
to changes this behaviour, so we can read zero file size files". I mean
this would be a huge change in internal api of filesystem layer and I
hope we doesn't break anything else.

But your are fine with me to say "there exists a problem with read of
zero sized files?".

I will create some "better" patches for this, this RFC should only answer
the question if you apply fixes or not.

- Alex

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

      reply	other threads:[~2014-03-03  8:52 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 ` [RFC 2/3] fs: read: handle zero files Alexander Aring
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 [this message]

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=20140303090411.GA24214@x61s.Speedport_W_921V_1_24_000 \
    --to=alex.aring@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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