errno = 0;
convert(arg, result);
if (errno) {
- bb_error_msg("%s: invalid number", arg);
+ bb_error_msg("invalid number '%s'", arg);
return 1;
}
return 0;
{
int v = bb_strtoi(str, NULL, 10);
if (errno) {
- bb_error_msg("%s: invalid number", str);
+ bb_error_msg("invalid number '%s'", str);
v = 0;
}
return v;
xioctl(fd, MEMGETINFO, &meminfo);
mtdoffset = bb_strtou(opt_s, NULL, 0);
+ if (errno)
+ bb_error_msg_and_die("invalid number '%s'", opt_s);
/* Pull it into a CPU register (hopefully) - smaller code that way */
meminfo_writesize = meminfo.writesize;
arg = argv[i];
omit = bb_strtoi(arg, NULL, 10);
if (errno) {
- bb_error_msg("bad pid '%s'", arg);
+ bb_error_msg("invalid number '%s'", arg);
ret = 1;
goto resume;
}
arg++;
pid = bb_strtoi(arg, NULL, 10);
if (errno) {
- bb_error_msg("bad pid '%s'", arg);
+ bb_error_msg("invalid number '%s'", arg);
errors++;
} else if (kill(pid, signo) != 0) {
bb_perror_msg("can't kill pid %d", (int)pid);
} else {
who = bb_strtou(arg, NULL, 10);
if (errno) {
- bb_error_msg("bad value: %s", arg);
+ bb_error_msg("invalid number '%s'", arg);
goto HAD_ERROR;
}
}
else
val = bb_strtoull(val_str, NULL, 10);
if (errno) {
- bb_error_msg("bad number");
+ bb_error_msg("invalid number '%s'", val_str);
return EXIT_FAILURE;
}
val <<= l->factor_shift;