Skip to content

Commit

Permalink
Fix for a "ps -l" regression introduced by the new "ps -y" option
Browse files Browse the repository at this point in the history
introduced above.  Without the patch, the -l option generates a
segmentation violation if not accompanied by a -C cpu specifier
option.
(vinayakm.list@gmail.com)
  • Loading branch information
Dave Anderson committed Nov 3, 2017
1 parent e2efacd commit f852f5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion task.c
Expand Up @@ -3485,7 +3485,7 @@ show_last_run(struct task_context *tc, struct psinfo *psi)
sprintf(format, "[%c%dll%c] ", '%', c,
pc->output_radix == 10 ? 'u' : 'x');

if (psi) {
if (psi && psi->cpus) {
for (c = others = 0; c < kt->cpus; c++) {
if (!NUM_IN_BITMAP(psi->cpus, c))
continue;
Expand Down

0 comments on commit f852f5c

Please sign in to comment.