]> www.infradead.org Git - mtd-utils.git/commit
nanddump: check write function result for errors
authorRafał Miłecki <zajec5@gmail.com>
Mon, 18 Jul 2016 15:09:45 +0000 (17:09 +0200)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Thu, 17 Nov 2016 10:16:21 +0000 (11:16 +0100)
commit3391c127f4999b47299e51d305907c772c01167c
tree85c76a8c660b7370269a4f009f9c3786e470f7a3
parenta6dcd8f3215b435ba21ce26eb230b1484417d1e3
nanddump: check write function result for errors

Errors may happen, it's e.g. easy on embedded devices to run out of space
when dumping big partitions. This patch adds a helper function for
writing. It deals with partial writes and just returns 0 on success or
error number.

The old code didn't check for errors at all which could result in
incomplete dumps without exiting with an error.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
nand-utils/nanddump.c