diff options
Diffstat (limited to 'procps')
-rw-r--r-- | procps/iostat.c | 4 | ||||
-rw-r--r-- | procps/mpstat.c | 6 | ||||
-rw-r--r-- | procps/nmeter.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/procps/iostat.c b/procps/iostat.c index 573419e1c..8641c2391 100644 --- a/procps/iostat.c +++ b/procps/iostat.c | |||
@@ -539,12 +539,12 @@ int iostat_main(int argc, char **argv) | |||
539 | 539 | ||
540 | if (*argv) { | 540 | if (*argv) { |
541 | /* Get interval */ | 541 | /* Get interval */ |
542 | interval = xatoi_u(*argv); | 542 | interval = xatoi_positive(*argv); |
543 | count = interval ? -1 : 1; | 543 | count = interval ? -1 : 1; |
544 | argv++; | 544 | argv++; |
545 | if (*argv) | 545 | if (*argv) |
546 | /* Get count value */ | 546 | /* Get count value */ |
547 | count = xatoi_u(*argv); | 547 | count = xatoi_positive(*argv); |
548 | } | 548 | } |
549 | 549 | ||
550 | /* Allocate space for device stats */ | 550 | /* Allocate space for device stats */ |
diff --git a/procps/mpstat.c b/procps/mpstat.c index 7610a68fb..85cbb45db 100644 --- a/procps/mpstat.c +++ b/procps/mpstat.c | |||
@@ -930,14 +930,14 @@ int mpstat_main(int UNUSED_PARAM argc, char **argv) | |||
930 | 930 | ||
931 | if (*argv) { | 931 | if (*argv) { |
932 | /* Get interval */ | 932 | /* Get interval */ |
933 | G.interval = xatoi_u(*argv); | 933 | G.interval = xatoi_positive(*argv); |
934 | G.count = -1; | 934 | G.count = -1; |
935 | argv++; | 935 | argv++; |
936 | if (*argv) { | 936 | if (*argv) { |
937 | /* Get count value */ | 937 | /* Get count value */ |
938 | if (G.interval == 0) | 938 | if (G.interval == 0) |
939 | bb_show_usage(); | 939 | bb_show_usage(); |
940 | G.count = xatoi_u(*argv); | 940 | G.count = xatoi_positive(*argv); |
941 | //if (*++argv) | 941 | //if (*++argv) |
942 | // bb_show_usage(); | 942 | // bb_show_usage(); |
943 | } | 943 | } |
@@ -979,7 +979,7 @@ int mpstat_main(int UNUSED_PARAM argc, char **argv) | |||
979 | memset(G.cpu_bitmap, 0xff, G.cpu_bitmap_len); | 979 | memset(G.cpu_bitmap, 0xff, G.cpu_bitmap_len); |
980 | } else { | 980 | } else { |
981 | /* Get CPU number */ | 981 | /* Get CPU number */ |
982 | unsigned n = xatoi_u(t); | 982 | unsigned n = xatoi_positive(t); |
983 | if (n >= G.cpu_nr) | 983 | if (n >= G.cpu_nr) |
984 | bb_error_msg_and_die("not that many processors"); | 984 | bb_error_msg_and_die("not that many processors"); |
985 | n++; | 985 | n++; |
diff --git a/procps/nmeter.c b/procps/nmeter.c index bb1e819a6..930585695 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c | |||
@@ -422,7 +422,7 @@ static s_stat* init_int(const char *param) | |||
422 | if (param[0] == '\0') { | 422 | if (param[0] == '\0') { |
423 | s->no = 1; | 423 | s->no = 1; |
424 | } else { | 424 | } else { |
425 | int n = xatoi_u(param); | 425 | int n = xatoi_positive(param); |
426 | s->no = n + 2; | 426 | s->no = n + 2; |
427 | } | 427 | } |
428 | return (s_stat*)s; | 428 | return (s_stat*)s; |