summaryrefslogtreecommitdiff
path: root/flash_otp_write.c
AgeCommit message (Collapse)Author
2013-03-11flash_otp_write: fix writing to NAND in presence of partial readsUwe Kleine-König
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>
2012-09-25consistency between u_int32_t / off_t / off64_tRichard Genoud
We should use the off_t type instead of off64_t or u_int32_t as its length is controlled by the WITHOUT_LARGEFILE flag. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2010-09-27mtd-utils: standardize PROGRAM_NAMEMike Frysinger
Make sure all the utils define PROGRAM_NAME and do so at the start of the file so that sub-headers may assume it exists. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2006-10-09Fixup whitespaceJosh Boyer
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2006-05-23s/oobblock/writesize/gJoern Engel
Follow the kernel in the rename. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
2006-04-11Initial commitDavid Woodhouse