]> www.infradead.org Git - mtd-utils.git/commit
nandwrite: clean up length types
authorMike Frysinger <vapier@gentoo.org>
Thu, 9 May 2013 00:03:13 +0000 (20:03 -0400)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 1 Jul 2013 06:00:41 +0000 (09:00 +0300)
commit6d17edd24cfcf3595a7f302d70afcfaebfb45629
tree7a406187fd4b0e3b372ec3f46cbbe349bfdbfef3
parentf6b476ee29833e13c0285d49ebb75666176b2aa7
nandwrite: clean up length types

We use 'int' in many places to represent offsets/sizes.  That obviously
does not play well with larger NAND devices on 32bit systems.  Instead,
use the right type as needed:
 - long long to represent the length of the image
 - use fstat() rather than lseek();lseek(); to get the length of the image
 - use size_t/ssize_t when working with read()
 - tweak the printf formats as needed

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
nandwrite.c