mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[misc] various small improvements
* Less scary message from bad blocks * Better error report for read/write_sectors * Fix a WDK warning
This commit is contained in:
parent
261834e31f
commit
8dc5429d9f
5 changed files with 11 additions and 9 deletions
|
@ -457,7 +457,7 @@ static unsigned int test_rw(HANDLE hDrive, blk_t last_block, size_t block_size,
|
|||
srand((unsigned int)GetTickCount());
|
||||
id_offset = rand()* (block_size-sizeof(blk_t)) / RAND_MAX;
|
||||
pattern_fill(buffer, pattern[pat_idx], blocks_at_once * block_size);
|
||||
uprintf("%sBlock ID at offset: %d\n", bb_prefix, id_offset);
|
||||
uprintf("%sUsing offset %d for fake device check\n", bb_prefix, id_offset);
|
||||
num_blocks = last_block - 1;
|
||||
currently_testing = first_block;
|
||||
if (s_flag | v_flag)
|
||||
|
|
|
@ -64,7 +64,7 @@ HANDLE GetDriveHandle(DWORD DriveIndex, char* DriveLetter, BOOL bWriteAccess, BO
|
|||
}
|
||||
DriveIndex -= DRIVE_INDEX_MIN;
|
||||
|
||||
// If no drive letter is requested, open a phyical drive
|
||||
// If no drive letter is requested, open a physical drive
|
||||
if (DriveLetter == NULL) {
|
||||
safe_sprintf(physical_drive, sizeof(physical_drive), "\\\\.\\PHYSICALDRIVE%d", DriveIndex);
|
||||
hDrive = CreateFileA(physical_drive, GENERIC_READ|(bWriteAccess?GENERIC_WRITE:0),
|
||||
|
|
|
@ -48,6 +48,7 @@ int64_t write_sectors(HANDLE hDrive, uint64_t SectorSize,
|
|||
if((!WriteFile(hDrive, pBuf, Size, &Size, NULL)) || (Size != nSectors*SectorSize))
|
||||
{
|
||||
uprintf("write_sectors: Write error - %s\n", WindowsErrorString());
|
||||
uprintf(" Wrote: %d, Expected: %d\n", Size, nSectors*SectorSize);
|
||||
uprintf(" StartSector:%0X, nSectors:%0X, SectorSize:%0X\n", StartSector, nSectors, SectorSize);
|
||||
return Size;
|
||||
}
|
||||
|
@ -80,6 +81,7 @@ int64_t read_sectors(HANDLE hDrive, uint64_t SectorSize,
|
|||
if((!ReadFile(hDrive, pBuf, Size, &Size, NULL)) || (Size != nSectors*SectorSize))
|
||||
{
|
||||
uprintf("read_sectors: Read error - %s\n", WindowsErrorString());
|
||||
uprintf(" Read: %d, Expected: %d\n", Size, nSectors*SectorSize);
|
||||
uprintf(" StartSector:%0X, nSectors:%0X, SectorSize:%0X\n", StartSector, nSectors, SectorSize);
|
||||
}
|
||||
|
||||
|
|
12
src/rufus.rc
12
src/rufus.rc
|
@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 206, 316
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Rufus v1.2.0.184"
|
||||
CAPTION "Rufus v1.2.0.185"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,278,50,14
|
||||
|
@ -77,7 +77,7 @@ BEGIN
|
|||
DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP
|
||||
CONTROL "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL,
|
||||
"SysLink",WS_TABSTOP,46,47,114,9
|
||||
LTEXT "Version 1.2.0 (Build 184)",IDC_STATIC,46,19,78,8
|
||||
LTEXT "Version 1.2.0 (Build 185)",IDC_STATIC,46,19,78,8
|
||||
PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP
|
||||
EDITTEXT IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL
|
||||
LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8
|
||||
|
@ -237,8 +237,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,2,0,184
|
||||
PRODUCTVERSION 1,2,0,184
|
||||
FILEVERSION 1,2,0,185
|
||||
PRODUCTVERSION 1,2,0,185
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -255,13 +255,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "akeo.ie"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.2.0.184"
|
||||
VALUE "FileVersion", "1.2.0.185"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "1.2.0.184"
|
||||
VALUE "ProductVersion", "1.2.0.185"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -944,7 +944,7 @@ BOOL IsShown(HWND hDlg)
|
|||
LONG GetEntryWidth(HWND hDropDown, const char *entry)
|
||||
{
|
||||
HDC hDC;
|
||||
HFONT hFont, hDefFont;
|
||||
HFONT hFont, hDefFont = NULL;
|
||||
SIZE size;
|
||||
WCHAR* wentry = NULL;
|
||||
int len;
|
||||
|
|
Loading…
Reference in a new issue