-
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.
* Also update copyright year and improve uprintf error handling * Also bump GitHub Actions dependencies. Note that we do NOT want to update to upload-artifact v4 because it BREAKS the creation of artifacts from matrix. See: https://github.com/actions/upload-artifact#v4---whats-new * Closes #2382 * Closes #2383
- Loading branch information
Showing
6 changed files
with
33 additions
and
19 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ cat > cmd.sed <<\_EOF | |
1i /*\ | ||
* Rufus: The Reliable USB Formatting Utility\ | ||
* Localization tables - autogenerated from resource.h\ | ||
* Copyright © 2013-2023 Pete Batard <[email protected]>\ | ||
* Copyright © 2013-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\ | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* | ||
* Modified from System Informer (a.k.a. Process Hacker): | ||
* https://github.com/winsiderss/systeminformer | ||
* Copyright © 2017-2023 Pete Batard <[email protected]> | ||
* Copyright © 2017-2024 Pete Batard <[email protected]> | ||
* Copyright © 2017 dmex | ||
* Copyright © 2009-2016 wj32 | ||
* | ||
|
@@ -589,6 +589,7 @@ static DWORD WINAPI SearchProcessThread(LPVOID param) | |
pe[j].seen_on_pass = blocking_process.nPass; | ||
static_strcpy(pe[j].cmdline, cmdline); | ||
} else if (usb_debug) { | ||
// coverity[dont_call] | ||
OutputDebugStringA("SearchProcessThread: No empty slot!\n"); | ||
} | ||
ReleaseMutex(hLock); | ||
|
@@ -726,10 +727,12 @@ static DWORD WINAPI SearchProcessThread(LPVOID param) | |
// We are the only ones updating the counter so no need for lock | ||
blocking_process.nPass++; | ||
// In extended debug mode, notify how much time our search took to the debug facility | ||
static_sprintf(tmp, "Process search run #%d completed in %llu ms\n", | ||
blocking_process.nPass, GetTickCount64() - start_time); | ||
if (usb_debug) | ||
if (usb_debug) { | ||
static_sprintf(tmp, "Process search run #%d completed in %llu ms\n", | ||
blocking_process.nPass, GetTickCount64() - start_time); | ||
// coverity[dont_call] | ||
OutputDebugStringA(tmp); | ||
} | ||
Sleep(1000); | ||
} | ||
|
||
|
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 | ||
* Standard User I/O Routines (logging, status, error, etc.) | ||
* Copyright © 2011-2023 Pete Batard <[email protected]> | ||
* Copyright © 2011-2024 Pete Batard <[email protected]> | ||
* Copyright © 2020 Mattiwatti <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
|
@@ -85,6 +85,7 @@ void uprintf(const char *format, ...) | |
|
||
wbuf = utf8_to_wchar(buf); | ||
// Send output to Windows debug facility | ||
// coverity[dont_call] | ||
OutputDebugStringW(wbuf); | ||
if ((hLog != NULL) && (hLog != INVALID_HANDLE_VALUE)) { | ||
// Send output to our log Window | ||
|
@@ -100,6 +101,7 @@ void uprintfs(const char* str) | |
{ | ||
wchar_t* wstr; | ||
wstr = utf8_to_wchar(str); | ||
// coverity[dont_call] | ||
OutputDebugStringW(wstr); | ||
if ((hLog != NULL) && (hLog != INVALID_HANDLE_VALUE)) { | ||
Edit_SetSel(hLog, MAX_LOG_SIZE, MAX_LOG_SIZE); | ||
|
@@ -257,11 +259,20 @@ const char *WindowsErrorString(void) | |
&err_string[presize], (DWORD)(sizeof(err_string)-strlen(err_string)), NULL); | ||
if (size == 0) { | ||
format_error = GetLastError(); | ||
if ((format_error) && (format_error != ERROR_MR_MID_NOT_FOUND) && (format_error != ERROR_MUI_FILE_NOT_LOADED)) | ||
switch (format_error) { | ||
case ERROR_SUCCESS: | ||
static_sprintf(err_string, "[0x%08lX] (No Windows Error String)", error_code); | ||
break; | ||
case ERROR_MR_MID_NOT_FOUND: | ||
case ERROR_MUI_FILE_NOT_FOUND: | ||
case ERROR_MUI_FILE_NOT_LOADED: | ||
static_sprintf(err_string, "[0x%08lX] (NB: This system was unable to provide an English error message)", error_code); | ||
break; | ||
default: | ||
static_sprintf(err_string, "[0x%08lX] (FormatMessage error code 0x%08lX)", | ||
error_code, format_error); | ||
else | ||
static_sprintf(err_string, "[0x%08lX] (No Windows Error String)", error_code); | ||
break; | ||
} | ||
} else { | ||
// Microsoft may suffix CRLF to error messages, which we need to remove... | ||
assert(presize > 2); | ||
|
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 | ||
* Standard Dialog Routines (Browse for folder, About, etc) | ||
* Copyright © 2011-2023 Pete Batard <[email protected]> | ||
* Copyright © 2011-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 | ||
|
@@ -386,7 +386,7 @@ INT_PTR CALLBACK AboutCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP | |
ResizeButtonHeight(hDlg, IDOK); | ||
static_sprintf(about_blurb, about_blurb_format, lmprintf(MSG_174|MSG_RTF), | ||
lmprintf(MSG_175|MSG_RTF, rufus_version[0], rufus_version[1], rufus_version[2]), | ||
"Copyright © 2011-2023 Pete Batard", | ||
"Copyright © 2011-2024 Pete Batard", | ||
lmprintf(MSG_176|MSG_RTF), lmprintf(MSG_177|MSG_RTF), lmprintf(MSG_178|MSG_RTF)); | ||
for (i = 0; i < ARRAYSIZE(hEdit); i++) { | ||
hEdit[i] = GetDlgItem(hDlg, edit_id[i]); | ||
|