openwrtv3/package/system/mtd/src
John Crispin 4a4c324cd2 mtd: fix reading of image magic bytes in smaller chunks
The image_check currently fails when it cannot read all magic bytes in a
single chunk. But this can happen when the data are read from a pipe. This
currently breaks the openmesh.sh upgrade script with musl because it uses
dd with a blocksize of 1 to copy the image file to the mtd process.

The read can simply be repeated until enough bytes are read for the magic
byte check. It only stops when either an error was returned or 0 bytes were
read.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 48891
2016-03-03 20:24:38 +00:00
..
crc32.c packages: clean up the package folder 2013-06-21 16:54:37 +00:00
crc32.h packages: clean up the package folder 2013-06-21 16:54:37 +00:00
fis.c packages: clean up the package folder 2013-06-21 16:54:37 +00:00
fis.h packages: clean up the package folder 2013-06-21 16:54:37 +00:00
imagetag.c package: mtd: move bcm963xx_tag definition into source code 2015-02-27 17:38:25 +00:00
jffs2.c mtd: add support for bad blocks in NAND flash 2014-03-26 10:50:09 +00:00
jffs2.h packages: clean up the package folder 2013-06-21 16:54:37 +00:00
linksys_bootcount.c mvebu: add support for the Linksys boot counter 2015-08-19 08:31:23 +00:00
Makefile mtd: enable "fixseama" on bcm53xx 2016-01-28 08:51:52 +00:00
md5.c packages: clean up the package folder 2013-06-21 16:54:37 +00:00
md5.h packages: clean up the package folder 2013-06-21 16:54:37 +00:00
mtd.c mtd: fix reading of image magic bytes in smaller chunks 2016-03-03 20:24:38 +00:00
mtd.h mtd: detect image format when writing 2016-02-06 16:29:12 +00:00
seama.c packages: clean up the package folder 2013-06-21 16:54:37 +00:00
seama.h packages: clean up the package folder 2013-06-21 16:54:37 +00:00
trx.c mtd: detect image format when writing 2016-02-06 16:29:12 +00:00