[PATCH] mtd-utils: allow 'ubiformat' to read from stdin
Artem Bityutskiy
dedekind at infradead.org
Tue Aug 26 02:13:43 EDT 2008
On Mon, 2008-08-25 at 21:09 +0200, Enrico Scholz wrote:
> This patch allows to read the image from stdin and adds an
> '--image-size' option to specify its size. 'upiupdatevol' has this
> feature already and it is useful for 'ubiformat' too.
>
> It adds a read_all() function which reads a block of data. Plain
> 'read(2)' can fail on
>
> nc -l -p 1234 | ubiformat -f - -S 25427968
>
> else.
Applied, pushed, but with few minor tweaks to make the utilities be
uni-styled. Thanks.
> + int fd;
Here I've removed TABs between "int" and "fd", and put a space.
> + ssize_t l = read(fd, buf, len);
And here.
> - struct stat st;
> + off_t st_size;
And here.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list