diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2013-02-28 10:42:09 +0100 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-03-11 09:51:29 +0200 |
commit | 86cf5bd1e0633f16c722500bd9717d999a7e2473 (patch) | |
tree | 961c1608f96123d1a4a128b3266ce4036bfcfd2b /tests/ubi-tests/integ.c | |
parent | 703bb3a4e0324ab7ef14b483e793738cc338358e (diff) |
flash_otp_write: fix writing to NAND in presence of partial reads
When doing something like:
{ printf "\xff"; printf "\xfe"; } | flash_otp_write -u /dev/mtd0 0
flash_otp_write might see only a single byte when reading from stdin for
the first tim. In this case (and without this patch) it pads to
$writesize with '\xff's and writes that out. In the next iteration it
reads the 2nd byte, pads and writes again. So the 2nd byte is written to
offset $writesize instead of 1.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'tests/ubi-tests/integ.c')
0 files changed, 0 insertions, 0 deletions