diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-08-29 13:29:02 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-08-29 13:29:02 +0200 |
commit | b32a5436633f53f0abf0fa29105cf7e5b65091cf (patch) | |
tree | e84b5d75ddee2a7bc3cb8a42d9ee669c15ba6e6f /miscutils/nandwrite.c | |
parent | a78227dc7320738ec930edbde1aaa0023a51ee4c (diff) | |
download | busybox-w32-b32a5436633f53f0abf0fa29105cf7e5b65091cf.tar.gz busybox-w32-b32a5436633f53f0abf0fa29105cf7e5b65091cf.tar.bz2 busybox-w32-b32a5436633f53f0abf0fa29105cf7e5b65091cf.zip |
nandwrite: complain on malformed -s NUM
Elsewhere: use common error message. -30 bytes net size change
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils/nandwrite.c')
-rw-r--r-- | miscutils/nandwrite.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/miscutils/nandwrite.c b/miscutils/nandwrite.c index d0e4397fb..8df0fdc81 100644 --- a/miscutils/nandwrite.c +++ b/miscutils/nandwrite.c | |||
@@ -72,6 +72,8 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv) | |||
72 | xioctl(fd, MEMGETINFO, &meminfo); | 72 | xioctl(fd, MEMGETINFO, &meminfo); |
73 | 73 | ||
74 | mtdoffset = bb_strtou(opt_s, NULL, 0); | 74 | mtdoffset = bb_strtou(opt_s, NULL, 0); |
75 | if (errno) | ||
76 | bb_error_msg_and_die("invalid number '%s'", opt_s); | ||
75 | 77 | ||
76 | /* Pull it into a CPU register (hopefully) - smaller code that way */ | 78 | /* Pull it into a CPU register (hopefully) - smaller code that way */ |
77 | meminfo_writesize = meminfo.writesize; | 79 | meminfo_writesize = meminfo.writesize; |