[LTP] [PATCH 1/2] pathconf01: Convert to new API

Yang Xu (Fujitsu) xuyang2018.jy@fujitsu.com
Wed Nov 29 06:36:40 CET 2023


Hi,Xiao Yang

>On 2023/11/2 16:05, Yang Xu wrote:
...
>> -struct pathconf_args {
>> -     char *define_tag;
>> +static struct tcase {
>> +     char *name;
>>        int value;
>> -} args[] = {
>> -     {
>> -     "_PC_LINK_MAX", _PC_LINK_MAX}, {
>> -     "_PC_NAME_MAX", _PC_NAME_MAX}, {
>> -     "_PC_PATH_MAX", _PC_PATH_MAX}, {
>> -     "_PC_PIPE_BUF", _PC_PIPE_BUF}, {
>> -     "_PC_CHOWN_RESTRICTED", _PC_CHOWN_RESTRICTED}, {
>> -     "_PC_NO_TRUNC", _PC_NO_TRUNC}, {
>> -     NULL, 0}
>> +} tcases[] = {
>> +     {"_PC_LINK_MAX", _PC_LINK_MAX},
>> +     {"_PC_NAME_MAX", _PC_NAME_MAX},
>> +     {"_PC_PATH_MAX", _PC_PATH_MAX},
>> +     {"_PC_PIPE_BUF", _PC_PIPE_BUF},
>> +     {"_PC_CHOWN_RESTRICTED", _PC_CHOWN_RESTRICTED},
>> +     {"_PC_NO_TRUNC", _PC_NO_TRUNC},
>> +     {NULL, 0},
>Hi Yang,

>What is the purpose of the last entry? IMO, it is equal to the first
>entry. Other than that, it looks good to me.
>Reviewed-by: Xiao Yang <yangx.jy@fujitsu.com>

>Best Regards,
>Xiao Yang
...

The last entry doesn't  make any sense, I'll remove it in v2 patch.

Best Regards,
Yang Xu


More information about the ltp mailing list