]> www.infradead.org Git - mtd-utils.git/commitdiff
MTD Utils. (Resubmit as attachment)
authorSteve Finney <saf76@earthlink.net>
Thu, 11 May 2006 22:34:09 +0000 (15:34 -0700)
committerDavid Woodhouse <dwmw2@infradead.org>
Sun, 14 May 2006 17:48:35 +0000 (18:48 +0100)
Modify nandwrite to accept hex argument for "-s" argument; also
make an error message more accurate.

Signed-off-by: Steven Finney <sfinney@healthhero.com>
nandwrite.c

index a75ee0f730f29b7b8750ba01a42f043af4590a8a..fe19b829c065f72e0140bb812db64790f1759252 100644 (file)
@@ -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);
        }