summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Finney <saf76@earthlink.net>2006-05-11 15:34:09 -0700
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-14 18:48:35 +0100
commitfafd70f17b5b28aa9697c69dca42c7b04d14207e (patch)
treed46a8824998b468839399f3ae3dc66afe59f9d5d
parent378d454543e5357754e8d6727dc12e8afd797ddc (diff)
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 <sfinney@healthhero.com>
-rw-r--r--nandwrite.c4
1 files 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);
}