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)
311 parser_t *parser = config_open2(cfg_filename, xfopen_stdin); 311 parser_t *parser = config_open2(cfg_filename, xfopen_stdin);
312 while (config_read(parser, token, 2, 2, "#=", 312 while (config_read(parser, token, 2, 2, "#=",
313 (PARSE_NORMAL | PARSE_MIN_DIE) & ~(PARSE_TRIM | PARSE_COLLAPSE))) { 313 (PARSE_NORMAL | PARSE_MIN_DIE) & ~(PARSE_TRIM | PARSE_COLLAPSE))) {
314 unsigned val = xatoi_u(token[1]); 314 unsigned val = xatoi_positive(token[1]);
315 int i = index_in_strings(param_names, token[0]); 315 int i = index_in_strings(param_names, token[0]);
316 if (i < 0) 316 if (i < 0)
317 bb_error_msg_and_die("syntax error: %s", token[0]); 317 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)
2055#if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF 2055#if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF
2056 if (c == 'R') { 2056 if (c == 'R') {
2057 scan_hwif = parse_opts_0_INTMAX(&hwif_data); 2057 scan_hwif = parse_opts_0_INTMAX(&hwif_data);
2058 hwif_ctrl = xatoi_u((argv[optind]) ? argv[optind] : ""); 2058 hwif_ctrl = xatoi_positive((argv[optind]) ? argv[optind] : "");
2059 hwif_irq = xatoi_u((argv[optind+1]) ? argv[optind+1] : ""); 2059 hwif_irq = xatoi_positive((argv[optind+1]) ? argv[optind+1] : "");
2060 /* Move past the 2 additional arguments */ 2060 /* Move past the 2 additional arguments */
2061 argv += 2; 2061 argv += 2;
2062 argc -= 2; 2062 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)
73 73
74 if (!(opt & (OPT_n|OPT_c))) { 74 if (!(opt & (OPT_n|OPT_c))) {
75 if (!(opt & OPT_p) && *argv) 75 if (!(opt & OPT_p) && *argv)
76 pid = xatoi_u(*argv); 76 pid = xatoi_positive(*argv);
77 77
78 pri = ioprio_get(IOPRIO_WHO_PROCESS, pid); 78 pri = ioprio_get(IOPRIO_WHO_PROCESS, pid);
79 if (pri == -1) 79 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)
36 basedev = argv[1]; 36 basedev = argv[1];
37 buf = xasprintf("%s%u", argv[1], (unsigned)-1); 37 buf = xasprintf("%s%u", argv[1], (unsigned)-1);
38 type = argv[2]; 38 type = argv[2];
39 Smajor = xatoi_u(argv[3]); 39 Smajor = xatoi_positive(argv[3]);
40 Sminor = xatoi_u(argv[4]); 40 Sminor = xatoi_positive(argv[4]);
41 S = xatoi_u(argv[5]); 41 S = xatoi_positive(argv[5]);
42 E = xatoi_u(argv[6]); 42 E = xatoi_positive(argv[6]);
43 nodname = argv[7] ? basedev : buf; 43 nodname = argv[7] ? basedev : buf;
44 44
45 mode = 0660; 45 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)
106 106
107 op.mt_op = opcode_value[idx]; 107 op.mt_op = opcode_value[idx];
108 if (argv[2]) 108 if (argv[2])
109 op.mt_count = xatoi_u(argv[2]); 109 op.mt_count = xatoi_positive(argv[2]);
110 else 110 else
111 op.mt_count = 1; /* One, not zero, right? */ 111 op.mt_count = 1; /* One, not zero, right? */
112 112
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)
53 rf_name = "uwb"; 53 rf_name = "uwb";
54 rf_type = index_in_strings(rfkill_types, rf_name); 54 rf_type = index_in_strings(rfkill_types, rf_name);
55 if (rf_type < 0) { 55 if (rf_type < 0) {
56 rf_idx = xatoi_u(rf_name); 56 rf_idx = xatoi_positive(rf_name);
57 } 57 }
58 } 58 }
59 59