mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-20 12:11:26 +00:00
Make SCST patters matching, for instance, to match initiator names to their group names, case insensitive
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4981 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -68,7 +68,7 @@ static int __wildcmp(const char *wild, const char *string, int recursion_level)
|
||||
if ((*wild == '!') && (recursion_level == 0))
|
||||
return !__wildcmp(++wild, string, ++recursion_level);
|
||||
|
||||
if ((*wild != *string) && (*wild != '?'))
|
||||
if ((tolower(*wild) != tolower(*string)) && (*wild != '?'))
|
||||
return 0;
|
||||
|
||||
wild++;
|
||||
@@ -85,7 +85,7 @@ static int __wildcmp(const char *wild, const char *string, int recursion_level)
|
||||
|
||||
mp = wild;
|
||||
cp = string+1;
|
||||
} else if ((*wild == *string) || (*wild == '?')) {
|
||||
} else if ((tolower(*wild) == tolower(*string)) || (*wild == '?')) {
|
||||
wild++;
|
||||
string++;
|
||||
} else {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/unistd.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/ktime.h>
|
||||
@@ -6396,7 +6397,7 @@ static bool __wildcmp(const char *wild, const char *string, int recursion_level)
|
||||
if ((*wild == '!') && (recursion_level == 0))
|
||||
return !__wildcmp(++wild, string, ++recursion_level);
|
||||
|
||||
if ((*wild != *string) && (*wild != '?'))
|
||||
if ((tolower(*wild) != tolower(*string)) && (*wild != '?'))
|
||||
return false;
|
||||
|
||||
wild++;
|
||||
@@ -6413,7 +6414,7 @@ static bool __wildcmp(const char *wild, const char *string, int recursion_level)
|
||||
|
||||
mp = wild;
|
||||
cp = string+1;
|
||||
} else if ((*wild == *string) || (*wild == '?')) {
|
||||
} else if ((tolower(*wild) == tolower(*string)) || (*wild == '?')) {
|
||||
wild++;
|
||||
string++;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user