On Wed, Jul 3, 2024 at 6:58 AM Tao Liu <ltao@xxxxxxxxxx> wrote:
Hi Lijiang & Zhijian,
On Tue, Jul 2, 2024 at 8:23 PM lijiang <lijiang@xxxxxxxxxx> wrote:
>
> On Tue, Jul 2, 2024 at 2:31 PM Li Zhijian <lizhijian@xxxxxxxxxxx> wrote:
>>
>> Previously, if LIST_HEAD_FORMAT was not set, `list -r` will traverse the
>> list in order, that doesn't obey the -r(reverse) semantics.
>>
>> Per the code, -r(LIST_HEAD_REVERSE) only work with LIST_HEAD_FORMAT and
>> '-r' usage also says that "For a list linked with list_head structures",
>> so it's reasonable to enable LIST_HEAD_FORMAT for it.
>>
>> Cc: Lianbo Jiang <lijiang@xxxxxxxxxx>
>> Cc: Tao Liu <ltao@xxxxxxxxxx>
>> Signed-off-by: Li Zhijian <lizhijian@xxxxxxxxxxx>
>>
>> ---
>> V2: enable LIST_HEAD_FORMAT for -r option instead of fatal when -h/-H is
>> not specified for -r. # Lianbo
>> ---
>> tools.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/tools.c b/tools.c
>> index 0f2db108838a..1022d579071a 100644
>> --- a/tools.c
>> +++ b/tools.c
>> @@ -3370,6 +3370,7 @@ cmd_list(void)
>> break;
>>
>> case 'r':
>> + ld->flags |= LIST_HEAD_FORMAT;
>> ld->flags |= LIST_HEAD_REVERSE;
>> break;
>>
>
> Thank you for the update, and this looks good to me. So for the v2: Ack.
>
LGTM, so ack
Applied(slightly modified in patch log):
Thanks
Lianbo
Thanks,
Tao Liu
>
>>
>> --
>> 2.29.2
>>
-- Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/ Contribution Guidelines: https://github.com/crash-utility/crash/wiki