From fafd70f17b5b28aa9697c69dca42c7b04d14207e Mon Sep 17 00:00:00 2001 From: Steve Finney Date: Thu, 11 May 2006 15:34:09 -0700 Subject: MTD Utils. (Resubmit as attachment) Modify nandwrite to accept hex argument for "-s" argument; also make an error message more accurate. Signed-off-by: Steven Finney --- nandwrite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nandwrite.c b/nandwrite.c index a75ee0f..fe19b82 100644 --- a/nandwrite.c +++ b/nandwrite.c @@ -183,7 +183,7 @@ void process_options (int argc, char *argv[]) pad = 1; break; case 's': - mtdoffset = atoi (optarg); + mtdoffset = strtol (optarg, NULL, 0); break; case 'b': blockalign = atoi (optarg); @@ -451,7 +451,7 @@ int main(int argc, char **argv) close(fd); if (imglen > 0) { - perror ("Data did not fit into device, due to bad blocks\n"); + perror ("Data was only partially written due to error\n"); exit (1); } -- cgit v1.2.3