mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-29 14:05:22 -04:00
[misc] use %S to print wchar_t strings where possible
* Also fix some Coverity warnings
This commit is contained in:
parent
5309dc88e2
commit
befe2606cf
5 changed files with 17 additions and 27 deletions
10
src/drive.c
10
src/drive.c
|
@ -926,7 +926,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
|
|||
BYTE geometry[256] = {0}, layout[4096] = {0}, part_type;
|
||||
PDISK_GEOMETRY_EX DiskGeometry = (PDISK_GEOMETRY_EX)(void*)geometry;
|
||||
PDRIVE_LAYOUT_INFORMATION_EX DriveLayout = (PDRIVE_LAYOUT_INFORMATION_EX)(void*)layout;
|
||||
char *volume_name, *buf, tmp[256];
|
||||
char *volume_name, *buf;
|
||||
|
||||
if (FileSystemName == NULL)
|
||||
return FALSE;
|
||||
|
@ -1046,11 +1046,9 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
|
|||
DriveLayout->Gpt.MaxPartitionCount, DriveLayout->Gpt.StartingUsableOffset.QuadPart, DriveLayout->Gpt.UsableLength.QuadPart);
|
||||
for (i=0; i<DriveLayout->PartitionCount; i++) {
|
||||
SelectedDrive.nPartitions++;
|
||||
tmp[0] = 0;
|
||||
wchar_to_utf8_no_alloc(DriveLayout->PartitionEntry[i].Gpt.Name, tmp, sizeof(tmp));
|
||||
isUefiNtfs = (strcmp(tmp, "UEFI:NTFS") == 0);
|
||||
suprintf("Partition %d%s:\r\n Type: %s\r\n Name: '%s'", i+1, isUefiNtfs ? " (UEFI:NTFS)" : "",
|
||||
GuidToString(&DriveLayout->PartitionEntry[i].Gpt.PartitionType), tmp);
|
||||
isUefiNtfs = (wcscmp(DriveLayout->PartitionEntry[i].Gpt.Name, L"UEFI:NTFS") == 0);
|
||||
suprintf("Partition %d%s:\r\n Type: %s\r\n Name: '%S'", i+1, isUefiNtfs ? " (UEFI:NTFS)" : "",
|
||||
GuidToString(&DriveLayout->PartitionEntry[i].Gpt.PartitionType), DriveLayout->PartitionEntry[i].Gpt.Name);
|
||||
suprintf(" ID: %s\r\n Size: %s (%" PRIi64 " bytes)\r\n Start Sector: %" PRIi64 ", Attributes: 0x%016" PRIX64,
|
||||
GuidToString(&DriveLayout->PartitionEntry[i].Gpt.PartitionId),
|
||||
SizeToHumanReadable(DriveLayout->PartitionEntry[i].PartitionLength.QuadPart, TRUE, FALSE),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue