1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[misc] update license URLs and align ms-sys's write_data buffer to 4K

* Also remove some obsolete TODOs
This commit is contained in:
Pete Batard 2019-09-06 11:32:37 +01:00
parent e3970ba707
commit 4c816a519e
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
9 changed files with 28 additions and 35 deletions

View file

@ -1497,7 +1497,7 @@ BOOL RemountVolume(char* drive_name)
* properly reset Windows's cached view of a drive partitioning short of cycling the USB port * properly reset Windows's cached view of a drive partitioning short of cycling the USB port
* (especially IOCTL_DISK_UPDATE_PROPERTIES is *USELESS*), and therefore the OS will try to * (especially IOCTL_DISK_UPDATE_PROPERTIES is *USELESS*), and therefore the OS will try to
* read the file system data at an old location, even if the partition has just been deleted. * read the file system data at an old location, even if the partition has just been deleted.
* TODO: We should do something like this is DeletePartitions() too. * TODO: We should do something like this in DeletePartitions() too.
*/ */
static BOOL ClearPartition(HANDLE hDrive, LARGE_INTEGER offset, DWORD size) static BOOL ClearPartition(HANDLE hDrive, LARGE_INTEGER offset, DWORD size)
{ {

View file

@ -810,7 +810,6 @@ errcode_t ext2fs_print_progress(int64_t cur_value, int64_t max_value)
static int64_t last_value = -1; static int64_t last_value = -1;
if (max_value == 0) if (max_value == 0)
return 0; return 0;
// TODO: Need to use OP_CREATE_FS here for standalone format
UpdateProgressWithInfo(OP_FORMAT, MSG_217, (uint64_t)((ext2_percent_start * max_value) + (ext2_percent_share * cur_value)), max_value); UpdateProgressWithInfo(OP_FORMAT, MSG_217, (uint64_t)((ext2_percent_start * max_value) + (ext2_percent_share * cur_value)), max_value);
cur_value = (int64_t)(((float)cur_value / (float)max_value) * min(ext2_max_marker, (float)max_value)); cur_value = (int64_t)(((float)cur_value / (float)max_value) * min(ext2_max_marker, (float)max_value));
if ((cur_value < last_value) || (cur_value > last_value)) { if ((cur_value < last_value) || (cur_value > last_value)) {

View file

@ -41,23 +41,23 @@ const char* additional_copyrights =
"Freeware\\line\n" "Freeware\\line\n"
"\\line\n" "\\line\n"
"Additional icons courtesy of Axialis Software:\\line\n" "Additional icons courtesy of Axialis Software:\\line\n"
"https://axialis.com\\line\n" "https://axialis.com/\\line\n"
"CC BY-ND 4.0, when used as native resolution bitmaps\\line\n" "CC BY-ND 4.0, when used as native resolution bitmaps\\line\n"
"\\line\n" "\\line\n"
"Boot record handling from ms-sys by Henrik Carlqvist:\\line\n" "Boot record handling from ms-sys by Henrik Carlqvist:\\line\n"
"http://ms-sys.sourceforge.net\\line\n" "http://ms-sys.sourceforge.net/\\line\n"
"GNU General Public License (GPL) v2 or later\\line\n" "GNU General Public License (GPL) v2 or later\\line\n"
"\\line\n" "\\line\n"
"FreeDOS support from the FreeDOS project:\\line\n" "FreeDOS support from the FreeDOS project:\\line\n"
"http://www.freedos.org\\line\n" "https://www.freedos.org/\\line\n"
"GNU General Public License (GPL) v2 or later, with binary redistribution allowed\\line\n" "GNU General Public License (GPL) v2 or later, with binary redistribution allowed\\line\n"
"\\line\n" "\\line\n"
"ISO extraction support from libcdio by Rocky Bernstein et al.:\\line\n" "ISO extraction support from libcdio by Rocky Bernstein et al.:\\line\n"
"http://www.gnu.org/software/libcdio\\line\n" "https://www.gnu.org/software/libcdio\\line\n"
"GNU General Public License (GPL) v3 or later\\line\n" "GNU General Public License (GPL) v3 or later\\line\n"
"\\line\n" "\\line\n"
"Syslinux support from Syslinux by H. Peter Anvin et al.:\\line\n" "Syslinux support from Syslinux by H. Peter Anvin et al.:\\line\n"
"http://www.syslinux.org\\line\n" "https://syslinux.org/\\line\n"
"GNU General Public License (GPL) v2 or later\\line\n" "GNU General Public License (GPL) v2 or later\\line\n"
"\\line\n" "\\line\n"
"Grub4DOS support from Grub4DOS by chenall, itself based on GRUB Legacy by the Free Software Foundation:\\line\n" "Grub4DOS support from Grub4DOS by chenall, itself based on GRUB Legacy by the Free Software Foundation:\\line\n"
@ -65,16 +65,16 @@ const char* additional_copyrights =
"GNU General Public License (GPL) v2 or later\\line\n" "GNU General Public License (GPL) v2 or later\\line\n"
"\\line\n" "\\line\n"
"GRUB 2 support from GNU GRUB by the Free Software Foundation:\\line\n" "GRUB 2 support from GNU GRUB by the Free Software Foundation:\\line\n"
"http://www.gnu.org/software/grub\\line\n" "https://www.gnu.org/software/grub\\line\n"
"GNU General Public License (GPL) v3 or later\\line\n" "GNU General Public License (GPL) v3 or later\\line\n"
"\\line\n" "\\line\n"
"ReactOS support & additional FAT and time-conversion handling by ReactOS:\\line\n" "ReactOS support & additional FAT and time-conversion handling by ReactOS:\\line\n"
"http://www.reactos.org\\line\n" "https://www.reactos.org/\\line\n"
"http://svn.reactos.org/svn/reactos/trunk/reactos\\line\n" "https://svn.reactos.org/reactos/trunk\\line\n"
"GNU General Public License (GPL) v2 or later\\line\n" "GNU General Public License (GPL) v2 or later\\line\n"
"\\line\n" "\\line\n"
"Bad blocks testing and ext2/ext3 formattinmg from e2fsprogs by Theodore T'so et al.:\\line\n" "Bad blocks testing and ext2/ext3 formattinmg from e2fsprogs by Theodore T'so et al.:\\line\n"
"http://e2fsprogs.sourceforge.net\\line\n" "http://e2fsprogs.sourceforge.net/\\line\n"
"GNU General Public License (GPL) v3 compatible\\line\n" "GNU General Public License (GPL) v3 compatible\\line\n"
"\\line\n" "\\line\n"
"Large FAT32 volume formatting from fat32format by Tom Thornhill:\\line\n" "Large FAT32 volume formatting from fat32format by Tom Thornhill:\\line\n"
@ -82,20 +82,19 @@ const char* additional_copyrights =
"GNU General Public License (GPL) v2 or later\\line\n" "GNU General Public License (GPL) v2 or later\\line\n"
"\\line\n" "\\line\n"
"fmifs.dll usage based on Formatx by Mark Russinovich:\\line\n" "fmifs.dll usage based on Formatx by Mark Russinovich:\\line\n"
"http://doc.sch130.nsc.ru/www.sysinternals.com/ntw2k/source/fmifs.shtml\\line\n" "https://svn.reactos.org/reactos/trunk/reactos/dll/win32/fmifs\\line\n"
"http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/fmifs\\line\n"
"Public Domain\\line\n" "Public Domain\\line\n"
"\\line\n" "\\line\n"
"Device enumeration based on TestUSBDriveEject.cpp by ahmd:\\line\n" "Device enumeration based on TestUSBDriveEject.cpp by ahmd:\\line\n"
"http://www.codeguru.com/forum/showthread.php?p=1951973\\line\n" "https://www.codeguru.com/forum/showthread.php?p=1951973\\line\n"
"Public Domain\\line\n" "Public Domain\\line\n"
"\\line\n" "\\line\n"
"Handle search & process enumeration from Process Hacker by wj32 & dmex:\\line\n" "Handle search & process enumeration from Process Hacker by wj32 & dmex:\\line\n"
"http://processhacker.sourceforge.net/\\line\n" "https://processhacker.sourceforge.io/\\line\n"
"GNU General Public License (GPL) v3 or later\\line\n" "GNU General Public License (GPL) v3 or later\\line\n"
"\\line\n" "\\line\n"
"Decompression support from BusyBox/Bled:\\line\n" "Decompression support from BusyBox/Bled:\\line\n"
"http://www.busybox.net/\\line\n" "https://www.busybox.net/\\line\n"
"https://github.com/pbatard/bled\\line\n" "https://github.com/pbatard/bled\\line\n"
"GNU General Public License (GPL) v2 or later\\line\n" "GNU General Public License (GPL) v2 or later\\line\n"
"\\line\n" "\\line\n"
@ -103,32 +102,32 @@ const char* additional_copyrights =
"https://sourceforge.net/projects/smartmontools\\line\n" "https://sourceforge.net/projects/smartmontools\\line\n"
"GNU General Public License (GPL) v2 or later\\line\n" "GNU General Public License (GPL) v2 or later\\line\n"
"\\line\n" "\\line\n"
"FS Type description from by GNU fdisk:\\line\n" "FS Type description from GNU fdisk:\\line\n"
"http://www.gnu.org/software/fdisk\\line\n" "https://www.gnu.org/software/fdisk\\line\n"
"GNU General Public License (GPL) v3 or later\\line\n" "GNU General Public License (GPL) v3 or later\\line\n"
"\\line\n" "\\line\n"
"Additional bootloaders from KolibriOS:\\line\n" "Additional bootloaders from KolibriOS:\\line\n"
"http://kolibrios.org\\line\n" "https://kolibrios.org/\\line\n"
"GNU General Public License (GPL) v2 or later\\line\n" "GNU General Public License (GPL) v2 or later\\line\n"
"\\line\n" "\\line\n"
"MD5 checksum by Ron Rivest, Colin Plumb et al.\\line\n" "MD5 checksum by Ron Rivest, Colin Plumb et al.\\line\n"
"Public Domain\\line\n" "Public Domain\\line\n"
"\\line\n" "\\line\n"
"SHA-1 checksum from GnuPG:\\line\n" "SHA-1 checksum from GnuPG:\\line\n"
"https://www.gnupg.org\\line\n" "https://www.gnupg.org/\\line\n"
"GNU General Public License (GPL) v3 or later\\line\n" "GNU General Public License (GPL) v3 or later\\line\n"
"\\line\n" "\\line\n"
"SHA-256 checksum from 7-zip by Igor Pavlov and Crypto++ by Wei Dai:\\line\n" "SHA-256 checksum from 7-zip by Igor Pavlov and Crypto++ by Wei Dai:\\line\n"
"http://7-zip.org\\line\n" "https://7-zip.org/\\line\n"
"https://github.com/weidai11/cryptopp/\\line\n" "https://github.com/weidai11/cryptopp/\\line\n"
"Public Domain\\line\n" "Public Domain\\line\n"
"\\line\n" "\\line\n"
"About and License dialogs inspired by WinSCP by Martin Prikryl\\line\n" "About and License dialogs inspired by WinSCP by Martin Prikryl\\line\n"
"http://winscp.net\\line\n" "https://winscp.net/\\line\n"
"GNU General Public License (GPL) v3 or later\\line\n" "GNU General Public License (GPL) v3 or later\\line\n"
"\\line\n" "\\line\n"
"Check for Update dialog inspired by TortoiseSVN & TortoiseGit\\line\n" "Check for Update dialog inspired by TortoiseSVN & TortoiseGit\\line\n"
"http://tortoisesvn.net/, http://code.google.com/p/tortoisegit/\\line\n" "https://tortoisesvn.net/, https://tortoisegit.org/\\line\n"
"GNU General Public License (GPL) v2 or later\\line\n" "GNU General Public License (GPL) v2 or later\\line\n"
"\\line\n" "\\line\n"
"\\line\n" "\\line\n"

View file

@ -181,8 +181,7 @@ int write_data(FILE *fp, uint64_t Position,
{ {
int r = 0; int r = 0;
/* Windows' WriteFile() may require a buffer that is aligned to the sector size */ /* Windows' WriteFile() may require a buffer that is aligned to the sector size */
/* TODO: We may need to increase the alignment if we get report of issues on 4K */ unsigned char *aucBuf = _mm_malloc(MAX_DATA_LEN, 4096);
unsigned char *aucBuf = _mm_malloc(MAX_DATA_LEN, 512);
FAKE_FD* fd = (FAKE_FD*)fp; FAKE_FD* fd = (FAKE_FD*)fp;
HANDLE hDrive = (HANDLE)fd->_handle; HANDLE hDrive = (HANDLE)fd->_handle;
uint64_t StartSector, EndSector, NumSectors; uint64_t StartSector, EndSector, NumSectors;

View file

@ -71,7 +71,6 @@ const char* WinInetErrorString(void)
if ((error_code < INTERNET_ERROR_BASE) || (error_code > INTERNET_ERROR_LAST)) if ((error_code < INTERNET_ERROR_BASE) || (error_code > INTERNET_ERROR_LAST))
return WindowsErrorString(); return WindowsErrorString();
// TODO: These should be localized on an ad-hoc basis
switch(error_code) { switch(error_code) {
case ERROR_INTERNET_OUT_OF_HANDLES: case ERROR_INTERNET_OUT_OF_HANDLES:
return "No more handles could be generated at this time."; return "No more handles could be generated at this time.";

View file

@ -372,7 +372,6 @@ out:
/* /*
* Parse a locale section in a localization file (UTF-8, no BOM) * Parse a locale section in a localization file (UTF-8, no BOM)
* NB: this call is reentrant for the "base" command support * NB: this call is reentrant for the "base" command support
* TODO: Working on memory rather than on file would improve performance
*/ */
BOOL get_loc_data_file(const char* filename, loc_cmd* lcmd) BOOL get_loc_data_file(const char* filename, loc_cmd* lcmd)
{ {

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326 IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.7.1573" CAPTION "Rufus 3.7.1574"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0 FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -394,8 +394,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,7,1573,0 FILEVERSION 3,7,1574,0
PRODUCTVERSION 3,7,1573,0 PRODUCTVERSION 3,7,1574,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -413,13 +413,13 @@ BEGIN
VALUE "Comments", "https://akeo.ie" VALUE "Comments", "https://akeo.ie"
VALUE "CompanyName", "Akeo Consulting" VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.7.1573" VALUE "FileVersion", "3.7.1574"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2019 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2019 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus-3.7.exe" VALUE "OriginalFilename", "rufus-3.7.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.7.1573" VALUE "ProductVersion", "3.7.1574"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -496,7 +496,6 @@ int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid)
} }
} }
// TODO: try to perform inquiry if below a specific threshold (Verbatim, etc)?
duprintf(" Score: %d\n", score); duprintf(" Score: %d\n", score);
return score; return score;
} }

View file

@ -240,8 +240,7 @@ int GetCpuArch(void)
return CPU_ARCH_X86_64; return CPU_ARCH_X86_64;
case PROCESSOR_ARCHITECTURE_INTEL: case PROCESSOR_ARCHITECTURE_INTEL:
return CPU_ARCH_X86_64; return CPU_ARCH_X86_64;
// TODO: Set this back to PROCESSOR_ARCHITECTURE_ARM64 when the MinGW headers have it case PROCESSOR_ARCHITECTURE_ARM64:
case 12:
return CPU_ARCH_ARM_64; return CPU_ARCH_ARM_64;
case PROCESSOR_ARCHITECTURE_ARM: case PROCESSOR_ARCHITECTURE_ARM:
return CPU_ARCH_ARM_32; return CPU_ARCH_ARM_32;