Having four different forms for the same basic message is unneeded.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
if (2 < argc)
errx(EXIT_FAILURE, _("too many arguments"));
arg = argv[1];
- pid = strtopid_or_err(arg, _("invalid pid argument"));
+ pid = strtopid_or_err(arg, _("invalid PID argument"));
print_process_signal_state(pid);
exit(EXIT_SUCCESS);
}
pid_t pid;
char *p = strchr(arg, '=') + 1;
- pid = strtopid_or_err(p, _("invalid pid argument"));
+ pid = strtopid_or_err(p, _("invalid PID argument"));
print_process_signal_state((pid_t)pid);
exit(EXIT_SUCCESS);
}
break;
case 'c':
cpu_clock = xmalloc(sizeof(*cpu_clock));
- cpu_clock->pid = strtopid_or_err(optarg, _("failed to parse pid"));
+ cpu_clock->pid = strtopid_or_err(optarg, _("invalid PID argument"));
snprintf(cpu_clock->name, sizeof(cpu_clock->name),
"%jd", (intmax_t) cpu_clock->pid);
list_add(&cpu_clock->head, &cpu_clocks);
l->cmdname = xstrdup(oinfo->cmdname);
} else {
/* strtopid_or_err() is not suitable here; tok can be -1.*/
- l->pid = strtos32_or_err(tok, _("failed to parse pid"));
+ l->pid = strtos32_or_err(tok, _("invalid PID argument"));
if (l->pid > 0) {
l->cmdname = pid_get_cmdname(l->pid);
if (!l->cmdname)
pid_t *pids = xcalloc(n_strings, sizeof(*pids));
for (size_t i = 0; i < n_strings; i++)
- pids[i] = strtopid_or_err(strings[i], _("failed to parse pid"));
+ pids[i] = strtopid_or_err(strings[i], _("invalid PID argument"));
return pids;
}
switch (c) {
case 's':
args->src = strtopid_or_err(
- optarg,
- _("Failed to parse PID for -s/--source"));
+ optarg, _("invalid PID for -s/--source"));
break;
case 'd':
args->dest = strtopid_or_err(
- optarg, _("Failed to parse PID for -d/--dest"));
+ optarg, _("invalid PID for -d/--dest"));
break;
case 't':
args->type = parse_core_sched_type(optarg);
all_tasks = 1;
break;
case 'p':
- pid = strtopid_or_err(argv[argc - 1],
- _("invalid PID argument"));
+ pid = strtopid_or_err(argv[argc - 1], _("invalid PID argument"));
break;
case 'c':
ts.use_list = 1;
} else if (!strcmp(str, "none")) {
opts->ptracer = 0;
} else {
- opts->ptracer = strtopid_or_err(str, _("failed to parse ptracer pid"));
+ opts->ptracer = strtopid_or_err(str, _("invalid PID argument"));
}
}