mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 11:17:03 -04:00
[iso] enable extra libcdio debugging with Alt-.
* Also fix 2 memory leaks
This commit is contained in:
parent
bcca9144b7
commit
4bf69215bf
4 changed files with 11 additions and 14 deletions
|
@ -977,7 +977,7 @@ static BOOL WriteSBR(HANDLE hPhysicalDrive)
|
||||||
|
|
||||||
r = write_data(fp, br_size, buf, (uint64_t)size);
|
r = write_data(fp, br_size, buf, (uint64_t)size);
|
||||||
safe_free(grub2_buf);
|
safe_free(grub2_buf);
|
||||||
if (sub_type == BT_NON_BOOTABLE)
|
if (sub_type == BT_MAX)
|
||||||
safe_free(buf);
|
safe_free(buf);
|
||||||
return (r != 0);
|
return (r != 0);
|
||||||
}
|
}
|
||||||
|
|
10
src/iso.c
10
src/iso.c
|
@ -142,13 +142,7 @@ static __inline char* sanitize_filename(char* filename, BOOL* is_identical)
|
||||||
|
|
||||||
static void log_handler (cdio_log_level_t level, const char *message)
|
static void log_handler (cdio_log_level_t level, const char *message)
|
||||||
{
|
{
|
||||||
switch(level) {
|
uprintf("libcdio: %s", message);
|
||||||
case CDIO_LOG_DEBUG:
|
|
||||||
// TODO: use a setting to enable libcdio debug?
|
|
||||||
return;
|
|
||||||
default:
|
|
||||||
uprintf("libcdio: %s\n", message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1080,11 +1074,11 @@ out:
|
||||||
if (fd != NULL)
|
if (fd != NULL)
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
update_md5sum();
|
update_md5sum();
|
||||||
StrArrayDestroy(&modified_path);
|
|
||||||
} else if (HAS_BOOTMGR(img_report) && enable_ntfs_compression) {
|
} else if (HAS_BOOTMGR(img_report) && enable_ntfs_compression) {
|
||||||
// bootmgr might need to be uncompressed: https://github.com/pbatard/rufus/issues/1381
|
// bootmgr might need to be uncompressed: https://github.com/pbatard/rufus/issues/1381
|
||||||
RunCommand("compact /u bootmgr* efi/boot/*.efi", dest_dir, TRUE);
|
RunCommand("compact /u bootmgr* efi/boot/*.efi", dest_dir, TRUE);
|
||||||
}
|
}
|
||||||
|
StrArrayDestroy(&modified_path);
|
||||||
}
|
}
|
||||||
if (p_iso != NULL)
|
if (p_iso != NULL)
|
||||||
iso9660_close(p_iso);
|
iso9660_close(p_iso);
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include "drive.h"
|
#include "drive.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "bled/bled.h"
|
#include "bled/bled.h"
|
||||||
|
#include "cdio/logging.h"
|
||||||
#include "../res/grub/grub_version.h"
|
#include "../res/grub/grub_version.h"
|
||||||
#include "../res/grub2/grub2_version.h"
|
#include "../res/grub2/grub2_version.h"
|
||||||
|
|
||||||
|
@ -3105,6 +3106,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
||||||
use_fake_units = !ReadSettingBool(SETTING_USE_PROPER_SIZE_UNITS);
|
use_fake_units = !ReadSettingBool(SETTING_USE_PROPER_SIZE_UNITS);
|
||||||
use_vds = ReadSettingBool(SETTING_USE_VDS);
|
use_vds = ReadSettingBool(SETTING_USE_VDS);
|
||||||
usb_debug = ReadSettingBool(SETTING_ENABLE_USB_DEBUG);
|
usb_debug = ReadSettingBool(SETTING_ENABLE_USB_DEBUG);
|
||||||
|
cdio_loglevel_default = usb_debug ? CDIO_LOG_DEBUG : CDIO_LOG_WARN;
|
||||||
detect_fakes = !ReadSettingBool(SETTING_DISABLE_FAKE_DRIVES_CHECK);
|
detect_fakes = !ReadSettingBool(SETTING_DISABLE_FAKE_DRIVES_CHECK);
|
||||||
allow_dual_uefi_bios = ReadSettingBool(SETTING_ENABLE_WIN_DUAL_EFI_BIOS);
|
allow_dual_uefi_bios = ReadSettingBool(SETTING_ENABLE_WIN_DUAL_EFI_BIOS);
|
||||||
force_large_fat32 = ReadSettingBool(SETTING_FORCE_LARGE_FAT32_FORMAT);
|
force_large_fat32 = ReadSettingBool(SETTING_FORCE_LARGE_FAT32_FORMAT);
|
||||||
|
@ -3333,6 +3335,7 @@ relaunch:
|
||||||
// Alt-. => Enable USB enumeration debug
|
// Alt-. => Enable USB enumeration debug
|
||||||
if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == VK_OEM_PERIOD)) {
|
if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == VK_OEM_PERIOD)) {
|
||||||
usb_debug = !usb_debug;
|
usb_debug = !usb_debug;
|
||||||
|
cdio_loglevel_default = usb_debug ? CDIO_LOG_DEBUG : CDIO_LOG_WARN;
|
||||||
WriteSettingBool(SETTING_ENABLE_USB_DEBUG, usb_debug);
|
WriteSettingBool(SETTING_ENABLE_USB_DEBUG, usb_debug);
|
||||||
PrintStatusTimeout(lmprintf(MSG_270), usb_debug);
|
PrintStatusTimeout(lmprintf(MSG_270), usb_debug);
|
||||||
GetDevices(0);
|
GetDevices(0);
|
||||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -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.10.1653"
|
CAPTION "Rufus 3.10.1654"
|
||||||
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
|
||||||
|
@ -395,8 +395,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 3,10,1653,0
|
FILEVERSION 3,10,1654,0
|
||||||
PRODUCTVERSION 3,10,1653,0
|
PRODUCTVERSION 3,10,1654,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -414,13 +414,13 @@ BEGIN
|
||||||
VALUE "Comments", "https://rufus.ie"
|
VALUE "Comments", "https://rufus.ie"
|
||||||
VALUE "CompanyName", "Akeo Consulting"
|
VALUE "CompanyName", "Akeo Consulting"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "3.10.1653"
|
VALUE "FileVersion", "3.10.1654"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2020 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2020 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
||||||
VALUE "OriginalFilename", "rufus-3.10.exe"
|
VALUE "OriginalFilename", "rufus-3.10.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "3.10.1653"
|
VALUE "ProductVersion", "3.10.1654"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue