On 2023/08/03 12:23, lijiang wrote: >>> + if ((fd->flags & FOREACH_STATE) && >>> + (!STRNEQ(task_state_string(tc->task, buf, 0), >> fd->state))) >>> + continue; >> >> Thank you for the update. >> >> sorry for kind of nitpicking, why is this STRNEQ()? >> >> > When using the task_state_string(), the returned string may end with the > "EX" in some specific cases, let's also handle this situation. > > char * > task_state_string(ulong task, char *buf, int verbose) > { > ... > if (valid && exclusive) > strcat(buf, "EX"); ---> This will add the string "EX" at > the end of the actual task state string. > return buf; > } Thanks. It looks like an old legacy state, but the STRNEQ() is right on the code logic. Applied. https://github.com/crash-utility/crash/commit/558aecc98987e54b122a09ce0d3c3484b034277f Thanks, Kazu -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/crash-utility Contribution Guidelines: https://github.com/crash-utility/crash/wiki