Fix for a "ps -l" regression introduced by the new "ps -y" option

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)
This commit is contained in:
Dave Anderson 2017-11-03 09:21:22 -04:00
parent e2efacdd9b
commit f852f5ce4d

2
task.c
View File

@ -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;