-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
228 additions
and
246 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* Rufus: The Reliable USB Formatting Utility | ||
* Constants and defines missing from various toolchains | ||
* Copyright © 2016-2022 Pete Batard <[email protected]> | ||
* Copyright © 2016-2024 Pete Batard <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -31,6 +31,9 @@ | |
#define MIN(a,b) (((a) < (b)) ? (a) : (b)) | ||
#endif | ||
|
||
#define LO_ALIGN_X_TO_Y(x, y) (((x) / (y)) * (y)) | ||
#define HI_ALIGN_X_TO_Y(x, y) ((((x) + (y) - 1) / (y)) * (y)) | ||
|
||
#if defined(__GNUC__) | ||
#define ALIGNED(m) __attribute__ ((__aligned__(m))) | ||
#elif defined(_MSC_VER) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* Rufus: The Reliable USB Formatting Utility | ||
* Windows User Experience | ||
* Copyright © 2022-2023 Pete Batard <[email protected]> | ||
* Copyright © 2022-2024 Pete Batard <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -690,14 +690,14 @@ BOOL SetupWinToGo(DWORD DriveIndex, const char* drive_name, BOOL use_esp) | |
// VDS cannot list ESP volumes (talk about allegedly improving on the old disk and volume APIs, only to | ||
// completely neuter it) and IVdsDiskPartitionMF::FormatPartitionEx(), which is what you are supposed to | ||
// use for ESPs, explicitly states: "This method cannot be used to format removable media." | ||
if (!FormatPartition(DriveIndex, partition_offset[PI_ESP], cluster_size, FS_FAT32, "", | ||
if (!FormatPartition(DriveIndex, SelectedDrive.Partition[partition_index[PI_ESP]].Offset, cluster_size, FS_FAT32, "", | ||
FP_QUICK | FP_FORCE | FP_LARGE_FAT32 | FP_NO_BOOT)) { | ||
uprintf("Could not format EFI System Partition"); | ||
return FALSE; | ||
} | ||
Sleep(200); | ||
// Need to have the ESP mounted to invoke bcdboot | ||
ms_efi = AltMountVolume(DriveIndex, partition_offset[PI_ESP], FALSE); | ||
ms_efi = AltMountVolume(DriveIndex, SelectedDrive.Partition[partition_index[PI_ESP]].Offset, FALSE); | ||
if (ms_efi == NULL) { | ||
FormatStatus = ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | APPERR(ERROR_CANT_ASSIGN_LETTER); | ||
return FALSE; | ||
|