diff options
author | Karel Zak | 2012-05-15 17:45:05 +0200 |
---|---|---|
committer | Karel Zak | 2012-05-15 17:45:05 +0200 |
commit | 630ed89d5adc4868106fbc9608c1f822b881e191 (patch) | |
tree | 140c5d540c4a192564628625a5101374b3975c99 | |
parent | partx: cleanup strtoxx_or_err() (diff) | |
download | kernel-qcow2-util-linux-630ed89d5adc4868106fbc9608c1f822b881e191.tar.gz kernel-qcow2-util-linux-630ed89d5adc4868106fbc9608c1f822b881e191.tar.xz kernel-qcow2-util-linux-630ed89d5adc4868106fbc9608c1f822b881e191.zip |
schedutils: cleanup strtoxx_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | schedutils/chrt.c | 4 | ||||
-rw-r--r-- | schedutils/ionice.c | 12 | ||||
-rw-r--r-- | schedutils/taskset.c | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/schedutils/chrt.c b/schedutils/chrt.c index cbf2417e8..95a6adca4 100644 --- a/schedutils/chrt.c +++ b/schedutils/chrt.c @@ -254,7 +254,7 @@ int main(int argc, char **argv) break; case 'p': errno = 0; - pid = strtol_or_err(argv[argc - 1], _("failed to parse pid")); + pid = strtos32_or_err(argv[argc - 1], _("invalid PID argument")); break; case 'r': policy = SCHED_RR; @@ -296,7 +296,7 @@ int main(int argc, char **argv) } errno = 0; - priority = strtol_or_err(argv[optind], _("failed to parse priority")); + priority = strtos32_or_err(argv[optind], _("invalid priority argument")); #ifdef SCHED_RESET_ON_FORK /* sanity check */ diff --git a/schedutils/ionice.c b/schedutils/ionice.c index 5fdeccf8d..e25428d94 100644 --- a/schedutils/ionice.c +++ b/schedutils/ionice.c @@ -145,13 +145,13 @@ int main(int argc, char **argv) while ((c = getopt_long(argc, argv, "+n:c:p:tVh", longopts, NULL)) != EOF) switch (c) { case 'n': - data = strtol_or_err(optarg, _("failed to parse class data")); + data = strtos32_or_err(optarg, _("invalid class data argument")); set |= 1; break; case 'c': if (isdigit(*optarg)) - ioclass = strtol_or_err(optarg, - _("failed to parse class")); + ioclass = strtos32_or_err(optarg, + _("invalid class argument")); else { ioclass = parse_ioclass(optarg); if (ioclass < 0) @@ -162,7 +162,7 @@ int main(int argc, char **argv) set |= 2; break; case 'p': - pid = strtol_or_err(optarg, _("failed to parse pid")); + pid = strtos32_or_err(optarg, _("invalid PID argument")); break; case 't': tolerant = 1; @@ -210,7 +210,7 @@ int main(int argc, char **argv) ioprio_print(pid); for(; argv[optind]; ++optind) { - pid = strtol_or_err(argv[optind], _("failed to parse pid")); + pid = strtos32_or_err(argv[optind], _("invalid PID argument")); ioprio_print(pid); } } else if (set && pid) { @@ -220,7 +220,7 @@ int main(int argc, char **argv) ioprio_setpid(pid, ioclass, data); for(; argv[optind]; ++optind) { - pid = strtol_or_err(argv[optind], _("failed to parse pid")); + pid = strtos32_or_err(argv[optind], _("invalid PID argument")); ioprio_setpid(pid, ioclass, data); } } else if (argv[optind]) { diff --git a/schedutils/taskset.c b/schedutils/taskset.c index 908ac8e2d..c1bb17343 100644 --- a/schedutils/taskset.c +++ b/schedutils/taskset.c @@ -157,8 +157,8 @@ int main(int argc, char **argv) all_tasks = 1; break; case 'p': - pid = strtol_or_err(argv[argc - 1], - _("failed to parse pid")); + pid = strtos32_or_err(argv[argc - 1], + _("invalid PID argument")); break; case 'c': ts.use_list = 1; |