Re: [PATCH v4] lib/string: Introduce sysfs_streqcase
From: Gioh Kim
Date: Fri Apr 09 2021 - 08:41:45 EST
On Fri, Apr 9, 2021 at 9:11 AM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
>
>
> On Friday, April 9, 2021, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> On Thu, 8 Apr 2021 15:06:05 +0200 Gioh Kim <gi-oh.kim@xxxxxxxxx> wrote:
>>
>> > As the name shows, it checks if strings are equal in case insensitive
>> > manner.
>>
>> Peh. Who would die if we simply made sysfs_streq() case-insensitive?
>
>
> I think it will be a disaster. Like we have with case-insensitive file systems. Famous Mac case that most of the soft stop working when they actually moved to the right direction, I.e. case-sensitive. Personally I’m against such change.
Hi Andy,
I am sorry but I am a little bit confused because I don't have any
experience with case-insensitive file systems.
I think the case-insensitive file system does not care if sysfs_streq
is changed to case-insensitive.
For example, if the case-insensitive file system would accept the "OFF" command,
the user can pass either of "off" and "OFF" and both will work with
case-insensitive strfs_streq.
On the contrary, I think the case-sensitive file system would not like
it if sysfs_streq is made case-insensitive.
Could you please inform me what I am missing?
>
>
>
>
> --
> With Best Regards,
> Andy Shevchenko
>
>