if (*p == '=')
p++;
- ctl.pid = strtoul_or_err(optarg, _("failed to parse id"));
+ ctl.pid = strtopid_or_err(optarg, _("failed to parse id"));
} else
ctl.pid = logger_getpid();
break;
l->pid = oinfo->pid;
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"));
if (l->pid > 0) {
l->cmdname = pid_get_cmdname(l->pid);
json = 1;
break;
case 'p':
- target_pid = strtos32_or_err(optarg, _("invalid PID argument"));
+ target_pid = strtopid_or_err(optarg, _("invalid PID argument"));
break;
case 'o':
outarg = optarg;
break;
case 'p':
errno = 0;
+ /* strtopid_or_err() is not suitable here; 0 can be passed.*/
ctl->pid = strtos32_or_err(argv[argc - 1], _("invalid PID argument"));
break;
case 'r':
all_tasks = 1;
break;
case 'p':
- pid = strtos32_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;
break;
case 'p':
errno = 0;
- ctl->pid = strtos32_or_err(optarg, _("invalid PID argument"));
+ ctl->pid = strtopid_or_err(optarg, _("invalid PID argument"));
break;
case 's':
ctl->system = 1;
while ((c = getopt_long(argc, argv, "hn:p:V", longopts, NULL)) != -1) {
switch (c) {
case 'p':
- pid = strtos32_or_err(optarg, _("invalid PID argument"));
+ pid = strtopid_or_err(optarg, _("invalid PID argument"));
break;
case 'n':
adj = strtos32_or_err(optarg, _("invalid adjust argument"));
ls.persist = 1;
break;
case 'p':
- ls.fltr_pid = strtos32_or_err(optarg, _("invalid PID argument"));
+ ls.fltr_pid = strtopid_or_err(optarg, _("invalid PID argument"));
break;
case 'n':
ls.no_headings = 1;
case 'p':
if (pid)
errx(EXIT_FAILURE, _("option --pid may be specified only once"));
- pid = strtos32_or_err(optarg, _("invalid PID argument"));
+ pid = strtopid_or_err(optarg, _("invalid PID argument"));
break;
case 'o':
ncolumns = string_to_idarray(optarg,