From: Artem Bityutskiy <dedekind@infradead.org>
To: Hamish Moffatt <hamish@cloud.net.au>
Cc: linux-mtd@lists.infradead.org
Subject: Re: ubiupdatevol from pipe/compressed file
Date: Fri, 27 Jun 2008 17:36:19 +0300 [thread overview]
Message-ID: <1214577379.6573.27.camel@sauron> (raw)
In-Reply-To: <20080520083957.GA29998@cloud.net.au>
On Tue, 2008-05-20 at 18:39 +1000, Hamish Moffatt wrote:
> On Mon, May 19, 2008 at 11:54:01AM +0300, Artem Bityutskiy wrote:
> > On Mon, 2008-05-19 at 18:47 +1000, Hamish Moffatt wrote:
> > > Alternatively allow the uncompressed file size to be specified as a
> > > ubiupdatevol parameter. In my application I can store the uncompressed
> > > file size and provide it to ubiupdatevol ok.
> >
> > Yeah, I think it is reasonable to add one more option and pass the size
> > there. Then it could be easy to teach ubiupdatevol to read the specified
> > amount of bytes from stdin.
>
> Here's a patch for ubiupdatevol. It contains 3 changes;
>
> 1. Adds -s/--size switch;
> 2. Allows the image file to be specified as '-', meaning stdin; if used,
> the size must be specified.
>
> 3. In ubi_update_volume(), the code assumed that a read() requesting a
> whole LEB worth of data would always return the amount requested.
> However read() is allowed to return less than that, and does in some
> cases eg reading from a pipe. I modified it to call read() in a loop
> until it had a whole LEB worth of data.
You didn't send this N3 change, so I did this (and few more minor
tewaks) and pushed your patch, thanks.
http://git.infradead.org/mtd-utils.git?a=commit;h=8ec6531393464519a9d2720c27be200d226c21fb
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
prev parent reply other threads:[~2008-06-27 14:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-19 8:47 ubiupdatevol from pipe/compressed file Hamish Moffatt
2008-05-19 8:54 ` Artem Bityutskiy
2008-05-20 8:39 ` Hamish Moffatt
2008-05-20 11:19 ` Artem Bityutskiy
2008-05-20 11:53 ` Artem Bityutskiy
2008-06-27 14:36 ` Artem Bityutskiy [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=1214577379.6573.27.camel@sauron \
--to=dedekind@infradead.org \
--cc=hamish@cloud.net.au \
--cc=linux-mtd@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