Re: [PATCH v2] Fix the "foreach DE" task identifier displays incorrect state tasks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux