aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/fbsplash.c2
-rw-r--r--miscutils/hdparm.c4
-rw-r--r--miscutils/ionice.c2
-rw-r--r--miscutils/makedevs.c8
-rw-r--r--miscutils/mt.c2
-rw-r--r--miscutils/rfkill.c2
6 files changed, 10 insertions, 10 deletions
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
index e370d207b..a031cbd3a 100644
--- a/miscutils/fbsplash.c
+++ b/miscutils/fbsplash.c
@@ -311,7 +311,7 @@ static void init(const char *cfg_filename)
parser_t *parser = config_open2(cfg_filename, xfopen_stdin);
while (config_read(parser, token, 2, 2, "#=",
(PARSE_NORMAL | PARSE_MIN_DIE) & ~(PARSE_TRIM | PARSE_COLLAPSE))) {
- unsigned val = xatoi_u(token[1]);
+ unsigned val = xatoi_positive(token[1]);
int i = index_in_strings(param_names, token[0]);
if (i < 0)
bb_error_msg_and_die("syntax error: %s", token[0]);
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 236b1749c..c6ca3af80 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -2055,8 +2055,8 @@ int hdparm_main(int argc, char **argv)
#if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF
if (c == 'R') {
scan_hwif = parse_opts_0_INTMAX(&hwif_data);
- hwif_ctrl = xatoi_u((argv[optind]) ? argv[optind] : "");
- hwif_irq = xatoi_u((argv[optind+1]) ? argv[optind+1] : "");
+ hwif_ctrl = xatoi_positive((argv[optind]) ? argv[optind] : "");
+ hwif_irq = xatoi_positive((argv[optind+1]) ? argv[optind+1] : "");
/* Move past the 2 additional arguments */
argv += 2;
argc -= 2;
diff --git a/miscutils/ionice.c b/miscutils/ionice.c
index 52e51b908..6b791c491 100644
--- a/miscutils/ionice.c
+++ b/miscutils/ionice.c
@@ -73,7 +73,7 @@ int ionice_main(int argc UNUSED_PARAM, char **argv)
if (!(opt & (OPT_n|OPT_c))) {
if (!(opt & OPT_p) && *argv)
- pid = xatoi_u(*argv);
+ pid = xatoi_positive(*argv);
pri = ioprio_get(IOPRIO_WHO_PROCESS, pid);
if (pri == -1)
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c
index abf505770..0578d9251 100644
--- a/miscutils/makedevs.c
+++ b/miscutils/makedevs.c
@@ -36,10 +36,10 @@ int makedevs_main(int argc, char **argv)
basedev = argv[1];
buf = xasprintf("%s%u", argv[1], (unsigned)-1);
type = argv[2];
- Smajor = xatoi_u(argv[3]);
- Sminor = xatoi_u(argv[4]);
- S = xatoi_u(argv[5]);
- E = xatoi_u(argv[6]);
+ Smajor = xatoi_positive(argv[3]);
+ Sminor = xatoi_positive(argv[4]);
+ S = xatoi_positive(argv[5]);
+ E = xatoi_positive(argv[6]);
nodname = argv[7] ? basedev : buf;
mode = 0660;
diff --git a/miscutils/mt.c b/miscutils/mt.c
index 586373d13..8df2b75f7 100644
--- a/miscutils/mt.c
+++ b/miscutils/mt.c
@@ -106,7 +106,7 @@ int mt_main(int argc UNUSED_PARAM, char **argv)
op.mt_op = opcode_value[idx];
if (argv[2])
- op.mt_count = xatoi_u(argv[2]);
+ op.mt_count = xatoi_positive(argv[2]);
else
op.mt_count = 1; /* One, not zero, right? */
diff --git a/miscutils/rfkill.c b/miscutils/rfkill.c
index 0f5817b76..7d8ad1cfc 100644
--- a/miscutils/rfkill.c
+++ b/miscutils/rfkill.c
@@ -53,7 +53,7 @@ int rfkill_main(int argc UNUSED_PARAM, char **argv)
rf_name = "uwb";
rf_type = index_in_strings(rfkill_types, rf_name);
if (rf_type < 0) {
- rf_idx = xatoi_u(rf_name);
+ rf_idx = xatoi_positive(rf_name);
}
}