[SETUPLIB][USETUP] FS utilities: Use the ISO C and C++ conformant name: _wcsicmp

Stop using non-conforming wcsicmp.
See also PR #6925 by Timo Kreuzer.
This commit is contained in:
Hermès Bélusca-Maïto 2024-06-26 13:46:48 +02:00
parent a7a7e6a09c
commit f57601d14b
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 17 additions and 17 deletions

View file

@ -207,7 +207,7 @@ GetFileSystemByName(
{ {
Item = CONTAINING_RECORD(ListEntry, FILE_SYSTEM_ITEM, ListEntry); Item = CONTAINING_RECORD(ListEntry, FILE_SYSTEM_ITEM, ListEntry);
if (Item->FileSystemName && if (Item->FileSystemName &&
(wcsicmp(FileSystemName, Item->FileSystemName) == 0)) (_wcsicmp(FileSystemName, Item->FileSystemName) == 0))
{ {
return Item; return Item;
} }
@ -225,7 +225,7 @@ GetFileSystemByName(
while (Count--) while (Count--)
{ {
if (FileSystems->FileSystemName && if (FileSystems->FileSystemName &&
(wcsicmp(FileSystemName, FileSystems->FileSystemName) == 0)) (_wcsicmp(FileSystemName, FileSystems->FileSystemName) == 0))
{ {
return FileSystems; return FileSystems;
} }
@ -332,9 +332,9 @@ FormatFileSystem_UStr(
} }
/* Set the BackwardCompatible flag in case we format with older FAT12/16 */ /* Set the BackwardCompatible flag in case we format with older FAT12/16 */
if (wcsicmp(FileSystemName, L"FAT") == 0) if (_wcsicmp(FileSystemName, L"FAT") == 0)
BackwardCompatible = TRUE; BackwardCompatible = TRUE;
// else if (wcsicmp(FileSystemName, L"FAT32") == 0) // else if (_wcsicmp(FileSystemName, L"FAT32") == 0)
// BackwardCompatible = FALSE; // BackwardCompatible = FALSE;
/* Convert the FMIFS MediaFlag to a NT MediaType */ /* Convert the FMIFS MediaFlag to a NT MediaType */
@ -849,7 +849,7 @@ FormatPartition(
* Adjust the file system name in case of FAT vs. FAT32, according to * Adjust the file system name in case of FAT vs. FAT32, according to
* the type of partition returned by FileSystemToMBRPartitionType(). * the type of partition returned by FileSystemToMBRPartitionType().
*/ */
if (wcsicmp(FileSystemName, L"FAT") == 0) if (_wcsicmp(FileSystemName, L"FAT") == 0)
{ {
if ((PartitionType == PARTITION_FAT32) || if ((PartitionType == PARTITION_FAT32) ||
(PartitionType == PARTITION_FAT32_XINT13)) (PartitionType == PARTITION_FAT32_XINT13))

View file

@ -255,7 +255,7 @@ InferFileSystemWorker(
} }
Quit: Quit:
if (*FileSystemName && wcsicmp(FileSystemName, L"NTFS") == 0) if (*FileSystemName && _wcsicmp(FileSystemName, L"NTFS") == 0)
{ {
// WARNING: We cannot write on this FS yet! // WARNING: We cannot write on this FS yet!
DPRINT1("Recognized file system '%S' that doesn't have write support yet!\n", DPRINT1("Recognized file system '%S' that doesn't have write support yet!\n",
@ -340,9 +340,9 @@ FileSystemToMBRPartitionType(
if (SectorCount == 0) if (SectorCount == 0)
return PARTITION_ENTRY_UNUSED; return PARTITION_ENTRY_UNUSED;
if (wcsicmp(FileSystem, L"FAT") == 0 || if (_wcsicmp(FileSystem, L"FAT") == 0 ||
wcsicmp(FileSystem, L"FAT32") == 0 || _wcsicmp(FileSystem, L"FAT32") == 0 ||
wcsicmp(FileSystem, L"RAW") == 0) _wcsicmp(FileSystem, L"RAW") == 0)
{ {
if (SectorCount < 8192ULL) if (SectorCount < 8192ULL)
{ {
@ -385,14 +385,14 @@ FileSystemToMBRPartitionType(
} }
} }
} }
else if (wcsicmp(FileSystem, L"NTFS") == 0) else if (_wcsicmp(FileSystem, L"NTFS") == 0)
{ {
return PARTITION_IFS; return PARTITION_IFS;
} }
else if (wcsicmp(FileSystem, L"BTRFS") == 0 || else if (_wcsicmp(FileSystem, L"BTRFS") == 0 ||
wcsicmp(FileSystem, L"EXT2") == 0 || _wcsicmp(FileSystem, L"EXT2") == 0 ||
wcsicmp(FileSystem, L"EXT3") == 0 || _wcsicmp(FileSystem, L"EXT3") == 0 ||
wcsicmp(FileSystem, L"EXT4") == 0) _wcsicmp(FileSystem, L"EXT4") == 0)
{ {
return PARTITION_LINUX; return PARTITION_LINUX;
} }

View file

@ -76,7 +76,7 @@ InitializeFileSystemList(
Index = 0; Index = 0;
while (GetRegisteredFileSystems(Index++, &FileSystemName)) while (GetRegisteredFileSystems(Index++, &FileSystemName))
{ {
if (wcsicmp(FileSystemName, L"FAT") == 0) if (_wcsicmp(FileSystemName, L"FAT") == 0)
{ {
FatPresent = TRUE; FatPresent = TRUE;
break; break;
@ -92,7 +92,7 @@ InitializeFileSystemList(
/* USETUP only: If the FAT filesystem is present, show it, but /* USETUP only: If the FAT filesystem is present, show it, but
* don't display FAT32. The FAT formatter will automatically * don't display FAT32. The FAT formatter will automatically
* determine whether to use FAT12/16 or FAT32. */ * determine whether to use FAT12/16 or FAT32. */
if (FatPresent && wcsicmp(FileSystemName, L"FAT32") == 0) if (FatPresent && _wcsicmp(FileSystemName, L"FAT32") == 0)
continue; continue;
#endif #endif
AddProvider(List, FileSystemName); AddProvider(List, FileSystemName);
@ -132,7 +132,7 @@ CreateFileSystemList(
while (ListEntry != &List->ListHead) while (ListEntry != &List->ListHead)
{ {
Item = CONTAINING_RECORD(ListEntry, FILE_SYSTEM_ITEM, ListEntry); Item = CONTAINING_RECORD(ListEntry, FILE_SYSTEM_ITEM, ListEntry);
if (Item->FileSystem && wcsicmp(SelectFileSystem, Item->FileSystem) == 0) if (Item->FileSystem && _wcsicmp(SelectFileSystem, Item->FileSystem) == 0)
{ {
List->Selected = Item; List->Selected = Item;
break; break;