aboutsummaryrefslogtreecommitdiff
path: root/miscutils/hdparm.c
diff options
context:
space:
mode:
authorGravatar Denis Vlasenko <vda.linux@googlemail.com>2006-10-08 12:49:22 +0000
committerGravatar Denis Vlasenko <vda.linux@googlemail.com>2006-10-08 12:49:22 +0000
commit1385899416a4396385ad421ae1f532be7103738a (patch)
treefc4d14a910593d1235318bb36abe5e9f72d2039e /miscutils/hdparm.c
parent5625415085e68ac5e150f54e685417c866620d76 (diff)
downloadbusybox-1385899416a4396385ad421ae1f532be7103738a.tar.gz
busybox-1385899416a4396385ad421ae1f532be7103738a.tar.bz2
attempt to regularize atoi mess.
Diffstat (limited to 'miscutils/hdparm.c')
-rw-r--r--miscutils/hdparm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 6c46f6a92..1c9a99e13 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -2063,7 +2063,7 @@ static void parse_opts(unsigned long *get, unsigned long *set, unsigned long *va
}
if (optarg) {
*set = 1;
- *value = bb_xgetlarg(optarg, 10, min, max);
+ *value = xatol_range(optarg, min, max);
}
}
@@ -2154,8 +2154,8 @@ int hdparm_main(int argc, char **argv)
#if ENABLE_FEATURE_HDPARM_HDIO_SCAN_HWIF
if (c == 'R') {
parse_opts(NULL, &scan_hwif, &hwif_data, 0, INT_MAX);
- hwif_ctrl = bb_xgetlarg((argv[optind]) ? argv[optind] : "", 10, 0, INT_MAX);
- hwif_irq = bb_xgetlarg((argv[optind+1]) ? argv[optind+1] : "", 10, 0, INT_MAX);
+ hwif_ctrl = xatoi_u((argv[optind]) ? argv[optind] : "");
+ hwif_irq = xatoi_u((argv[optind+1]) ? argv[optind+1] : "");
/* Move past the 2 additional arguments */
argv += 2;
argc -= 2;