nandwrite: allow hex values in the -s parameter
authorBaruch Siach <baruch@tkos.co.il>
Sun, 29 Aug 2010 07:36:49 +0000 (10:36 +0300)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 29 Aug 2010 11:15:57 +0000 (13:15 +0200)
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/nandwrite.c

index a20f7f38415ca3a750eecf0753312b9a7c0343e6..d0e4397fbde8a1ae84b60b8466c8d703135576ac 100644 (file)
@@ -71,7 +71,7 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv)
        fd = xopen(argv[0], O_RDWR);
        xioctl(fd, MEMGETINFO, &meminfo);
 
-       mtdoffset = xatou(opt_s);
+       mtdoffset = bb_strtou(opt_s, NULL, 0);
 
        /* Pull it into a CPU register (hopefully) - smaller code that way */
        meminfo_writesize = meminfo.writesize;