From: Ladislav Michl <ladis@linux-mips.org>
To: Grant Erickson <gerickson@nuovations.com>
Cc: Tommi Airikka <tommi.airikka@ericsson.com>,
linux-mtd@lists.infradead.org,
Richard Titmuss <titmuss@slimdevices.com>
Subject: Re: [PATCH 6/6] [MTD-UTILS] nandwrite: Add Support for Reading from Standard Input
Date: Mon, 8 Sep 2008 23:02:27 +0200 [thread overview]
Message-ID: <20080908210227.GA7461@michl.2n.cz> (raw)
In-Reply-To: <C4EAA2B4.118A3%gerickson@nuovations.com>
On Mon, Sep 08, 2008 at 09:36:52AM -0700, Grant Erickson wrote:
> On 9/8/08 9:14 AM, Ladislav Michl wrote:
> > So what about:
> >
> > while (not eof)
> > read page (and oob if selected) data into buffer
>
> What about a short read in which you only get part of a page or a whole page
> and part of the OOB data? Bail out? Best effort?
Simply loop reading (assuming blocking read) until
- read whole buffer (read returns something greater than zero) or
- read returns zero (end of file) and then pad buffer or
- read returns -1 and then bail out gracefully with strerror
printed to user.
> > next:
> > if (write buffer fails)
> > mark bad, select next page, goto next
> >
> > Reading from stdin would imply padding. Care to implement that?
>
> For the time being, padding must be explicitly requested.
Yes, I'm just suggesting to enable it for stdin input as it IMHO makes
sense namely with buffering described above.
> > PS: It is remotely possible that one day I do it myself, but I'm
> > notoriously slow on doing things I do not urgently need.
>
> Understood and agreed.
>
> For the present, the patch satisfies my cited use case (clearly those of
> Richard and hopefully those of Tommi) and given the value added, I'd
> advocate its inclusion and incremental evolution through future patches.
Sure, I cannot raise single complain against patch as I do not offer
anything better. I just merely pointed to possible solution.
Best regards,
ladis
next prev parent reply other threads:[~2008-09-08 21:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-08 4:29 [PATCH 6/6] [MTD-UTILS] nandwrite: Add Support for Reading from Standard Input Grant Erickson
2008-09-08 16:14 ` Ladislav Michl
2008-09-08 16:36 ` Grant Erickson
2008-09-08 21:02 ` Ladislav Michl [this message]
2008-11-20 22:50 ` Ladislav Michl
2008-11-28 22:40 ` Schlaegl Manfred jun.
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=20080908210227.GA7461@michl.2n.cz \
--to=ladis@linux-mips.org \
--cc=gerickson@nuovations.com \
--cc=linux-mtd@lists.infradead.org \
--cc=titmuss@slimdevices.com \
--cc=tommi.airikka@ericsson.com \
/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