mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
parent
f8c6903d21
commit
fe3b1eb6f6
12 changed files with 39 additions and 39 deletions
|
@ -134,7 +134,7 @@ check_timeout:
|
|||
cmpb ds:counter_timeout, 0x00
|
||||
jnz wait_for_keyboard
|
||||
|
||||
boot_fixed_disk: # Timeout occured => boot second bootable disk (non USB)
|
||||
boot_fixed_disk: # Timeout occurred => boot second bootable disk (non USB)
|
||||
call restore_rtc_vect # Remove our RTC override
|
||||
movb ds:partition_table, 0x81 # target we want to swap with 0x80
|
||||
push 0x0080
|
||||
|
|
|
@ -154,7 +154,7 @@ static void FatDateTimeToSystemTime(PLARGE_INTEGER SystemTime, PFAT_DATETIME Fat
|
|||
/* Fix seconds value that might get beyond the bound */
|
||||
if (TimeFields.Second > 59) TimeFields.Second = 0;
|
||||
|
||||
/* Perform ceonversion to system time if possible */
|
||||
/* Perform conversion to system time if possible */
|
||||
if (!RtlTimeFieldsToTime(&TimeFields, SystemTime)) {
|
||||
/* Set to default time if conversion failed */
|
||||
SystemTime->QuadPart = 0;
|
||||
|
@ -280,7 +280,7 @@ static BOOL ExtractFAT(int entry, const char* path)
|
|||
}
|
||||
|
||||
safe_closehandle(hFile);
|
||||
uprintf("Succesfully wrote '%s' (%d bytes)\n", filename, filesize);
|
||||
uprintf("Successfully wrote '%s' (%d bytes)\n", filename, filesize);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ BOOL ExtractFreeDOS(const char* path)
|
|||
// thus we would need to have a separate header with each file's timestamps
|
||||
|
||||
safe_closehandle(hFile);
|
||||
uprintf("Succesfully wrote '%s' (%d bytes)\n", filename, res_size);
|
||||
uprintf("Successfully wrote '%s' (%d bytes)\n", filename, res_size);
|
||||
|
||||
if ((i == 4) || (i == 10) || (i == 16) || (i == 22) || (i == ARRAYSIZE(res_name)-1))
|
||||
UpdateProgress(OP_DOS, -1.0f);
|
||||
|
|
|
@ -639,7 +639,7 @@ static const char* get_kb(void)
|
|||
case 0x00000440: // Kyrgyz Cyrillic
|
||||
return "ky";
|
||||
case 0x00000043:
|
||||
case 0x00000843: // Uzbek Crillic
|
||||
case 0x00000843: // Uzbek Cyrillic
|
||||
return "uz";
|
||||
case 0x00000042:
|
||||
case 0x00000442: // Turkmen
|
||||
|
@ -970,7 +970,7 @@ BOOL SetDOSLocale(const char* path, BOOL bFreeDOS)
|
|||
fprintf(fd, "set PATH=.;\\;\\LOCALE\n");
|
||||
fprintf(fd, "echo Using %s keyboard with %s codepage [%d]\n", kb_to_hr("us"), cp_to_hr(437), 437);
|
||||
fclose(fd);
|
||||
uprintf("Succesfully wrote 'AUTOEXEC.BAT'\n");
|
||||
uprintf("Successfully wrote 'AUTOEXEC.BAT'\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -997,7 +997,7 @@ BOOL SetDOSLocale(const char* path, BOOL bFreeDOS)
|
|||
bFreeDOS?"MENU ":"MENUITEM=", bFreeDOS?')':',', kb_to_hr("us"), cp_to_hr(437), 437);
|
||||
fprintf(fd, "%s", bFreeDOS?"MENU\n12?\n":"[1]\ndevice=\\locale\\display.sys con=(ega,,1)\n[2]\n");
|
||||
fclose(fd);
|
||||
uprintf("Succesfully wrote 'CONFIG.SYS'\n");
|
||||
uprintf("Successfully wrote 'CONFIG.SYS'\n");
|
||||
|
||||
// AUTOEXEC.BAT
|
||||
strcpy(filename, path);
|
||||
|
@ -1018,7 +1018,7 @@ BOOL SetDOSLocale(const char* path, BOOL bFreeDOS)
|
|||
fprintf(fd, "keyb %s,,\\locale\\%s\n", kb, kbdrv);
|
||||
fprintf(fd, ":2\n");
|
||||
fclose(fd);
|
||||
uprintf("Succesfully wrote 'AUTOEXEC.BAT'\n");
|
||||
uprintf("Successfully wrote 'AUTOEXEC.BAT'\n");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
18
src/format.c
18
src/format.c
|
@ -243,7 +243,7 @@ static void ToValidLabel(WCHAR* name, BOOL bFAT)
|
|||
if (name[i] == '_') j++;
|
||||
if (i<2*j) {
|
||||
// If the final label is mostly underscore, use the proposed label
|
||||
uprintf("FAT label is mostly undercores. Using '%s' label instead.\n", SelectedDrive.proposed_label);
|
||||
uprintf("FAT label is mostly underscores. Using '%s' label instead.\n", SelectedDrive.proposed_label);
|
||||
for(i=0; SelectedDrive.proposed_label[i]!=0; i++)
|
||||
name[i] = SelectedDrive.proposed_label[i];
|
||||
name[i] = 0;
|
||||
|
@ -265,7 +265,7 @@ static void ToValidLabel(WCHAR* name, BOOL bFAT)
|
|||
*
|
||||
* Low order word is calculated: Volume Serial Number is:
|
||||
* Month & Day 12/26 0c1ah
|
||||
* Sec & Hundrenths 41:94 295eh 3578:1d02
|
||||
* Sec & Hundredths 41:94 295eh 3578:1d02
|
||||
* -----
|
||||
* 3578h
|
||||
*
|
||||
|
@ -387,7 +387,7 @@ static BOOL FormatFAT32(DWORD DriveIndex)
|
|||
if (IS_ERROR(FormatStatus)) goto out;
|
||||
if (!DeviceIoControl (hLogicalVolume, IOCTL_DISK_GET_PARTITION_INFO, NULL, 0, &piDrive,
|
||||
sizeof(piDrive), &cbRet, NULL)) {
|
||||
die("Failed to get parition info\n", ERROR_NOT_SUPPORTED);
|
||||
die("Failed to get partition info\n", ERROR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
BytesPerSect = dgDrive.BytesPerSector;
|
||||
|
@ -493,7 +493,7 @@ static BOOL FormatFAT32(DWORD DriveIndex)
|
|||
// Sector 6 Backup boot sector
|
||||
// Sector 7 Backup FSInfo sector
|
||||
// Sector 8 Backup 'more boot code'
|
||||
// zero'd sectors upto ReservedSectCount
|
||||
// zeroed sectors upto ReservedSectCount
|
||||
// FAT1 ReservedSectCount to ReservedSectCount + FatSize
|
||||
// ...
|
||||
// FATn ReservedSectCount to ReservedSectCount + FatSize
|
||||
|
@ -525,7 +525,7 @@ static BOOL FormatFAT32(DWORD DriveIndex)
|
|||
die("This drive is too big for large FAT32 format\n", APPERR(ERROR_INVALID_VOLUME_SIZE));
|
||||
}
|
||||
|
||||
// Now we're commited - print some info first
|
||||
// Now we're committed - print some info first
|
||||
uprintf("Size : %s %u sectors\n", SizeToHumanReadable(piDrive.PartitionLength), TotalSectors);
|
||||
uprintf("Cluster size %d bytes, %d Bytes Per Sector\n", SectorsPerCluster*BytesPerSect, BytesPerSect);
|
||||
uprintf("Volume ID is %x:%x\n", VolumeId>>16, VolumeId&0xffff);
|
||||
|
@ -534,7 +534,7 @@ static BOOL FormatFAT32(DWORD DriveIndex)
|
|||
|
||||
// Fix up the FSInfo sector
|
||||
pFAT32FsInfo->dFree_Count = (UserAreaSize/SectorsPerCluster) - 1;
|
||||
pFAT32FsInfo->dNxt_Free = 3; // clusters 0-1 resered, we used cluster 2 for the root dir
|
||||
pFAT32FsInfo->dNxt_Free = 3; // clusters 0-1 reserved, we used cluster 2 for the root dir
|
||||
|
||||
uprintf("%d Free Clusters\n", pFAT32FsInfo->dFree_Count);
|
||||
// Work out the Cluster count
|
||||
|
@ -560,7 +560,7 @@ static BOOL FormatFAT32(DWORD DriveIndex)
|
|||
}
|
||||
}
|
||||
|
||||
uprintf ("Initialising reserved sectors and FATs...\n");
|
||||
uprintf ("Initializing reserved sectors and FATs...\n");
|
||||
// Now we should write the boot sector and fsinfo twice, once at 0 and once at the backup boot sect position
|
||||
for (i=0; i<2; i++) {
|
||||
int SectorStart = (i==0) ? 0 : BackupBootSect;
|
||||
|
@ -994,7 +994,7 @@ static BOOL SetupWinPE(char drive_letter)
|
|||
uprintf("Failed to add SetupSourceDevice in %s\n", dst);
|
||||
goto out;
|
||||
}
|
||||
uprintf("Succesfully added '%s' to %s\n", setupsrcdev, dst);
|
||||
uprintf("Successfully added '%s' to %s\n", setupsrcdev, dst);
|
||||
}
|
||||
|
||||
safe_sprintf(src, sizeof(src), "%c:\\%s\\setupldr.bin", drive_letter, basedir[index]);
|
||||
|
@ -1104,7 +1104,7 @@ static BOOL RemountVolume(char drive_letter)
|
|||
uprintf("Successfully remounted %s on %s\n", &drive_guid[4], drive_name);
|
||||
} else {
|
||||
uprintf("Failed to remount %s on %s\n", &drive_guid[4], drive_name);
|
||||
// This will leave the drive unaccessible and must be flagged as an error
|
||||
// This will leave the drive inaccessible and must be flagged as an error
|
||||
FormatStatus = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|APPERR(ERROR_CANT_REMOUNT_VOLUME);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ typedef unsigned __int64 uintmax_t;
|
|||
|
||||
/* 7.18.4.1 Macros for minimum-width integer constants
|
||||
|
||||
Accoding to Douglas Gwyn <gwyn@arl.mil>:
|
||||
According to Douglas Gwyn <gwyn@arl.mil>:
|
||||
"This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC
|
||||
9899:1999 as initially published, the expansion was required
|
||||
to be an integer constant of precisely matching type, which
|
||||
|
|
|
@ -314,7 +314,7 @@ BOOL DownloadFile(const char* url, const char* file, HWND hProgressDialog)
|
|||
HttpQueryInfoA(hRequest, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, (LPVOID)&dwStatus, &dwSize, NULL);
|
||||
if (dwStatus != 200) {
|
||||
error_code = ERROR_INTERNET_ITEM_NOT_FOUND;
|
||||
uprintf("Unable to acess file: Server status %d\n", dwStatus);
|
||||
uprintf("Unable to access file: Server status %d\n", dwStatus);
|
||||
goto out;
|
||||
}
|
||||
dwSize = sizeof(dwTotalSize);
|
||||
|
|
12
src/parser.c
12
src/parser.c
|
@ -90,7 +90,7 @@ static wchar_t* get_token_data_line(const wchar_t* wtoken, wchar_t* wline)
|
|||
return (wline[r] == 0)?NULL:&wline[r];
|
||||
}
|
||||
|
||||
// Parse a file (ANSI or UTF-8 or UTF-16) and return the data for the first occurence of 'token'
|
||||
// Parse a file (ANSI or UTF-8 or UTF-16) and return the data for the first occurrence of 'token'
|
||||
// The returned string is UTF-8 and MUST be freed by the caller
|
||||
char* get_token_data_file(const char* token, const char* filename)
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
// Parse a buffer (ANSI or UTF-8) and return the data for the 'n'th occurence of 'token'
|
||||
// Parse a buffer (ANSI or UTF-8) and return the data for the 'n'th occurrence of 'token'
|
||||
// The returned string is UTF-8 and MUST be freed by the caller
|
||||
char* get_token_data_buffer(const char* token, unsigned int n, const char* buffer, size_t buffer_size)
|
||||
{
|
||||
|
@ -345,7 +345,7 @@ out:
|
|||
if (fd_in != NULL) fclose(fd_in);
|
||||
if (fd_out != NULL) fclose(fd_out);
|
||||
|
||||
// If an insertion occured, delete existing file and use the new one
|
||||
// If an insertion occurred, delete existing file and use the new one
|
||||
if (ret != NULL) {
|
||||
// We're in Windows text mode => Remove CRs if requested
|
||||
fd_in = _wfopen(wtmpname, L"rb");
|
||||
|
@ -375,10 +375,10 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
// Search for a specific 'src' substring data for all occurences of 'token', and replace
|
||||
// Search for a specific 'src' substring data for all occurrences of 'token', and replace
|
||||
// it with 'rep'. File can be ANSI or UNICODE and is overwritten. Parameters are UTF-8.
|
||||
// The parsed line is of the form: [ ]token[ ]data
|
||||
// Returns a pointer to rep if replacement occured, NULL otherwise
|
||||
// Returns a pointer to rep if replacement occurred, NULL otherwise
|
||||
char* replace_in_token_data(const char* filename, const char* token, const char* src, const char* rep, BOOL dos2unix)
|
||||
{
|
||||
const wchar_t* outmode[] = { L"w", L"w, ccs=UTF-8", L"w, ccs=UTF-16LE" };
|
||||
|
@ -491,7 +491,7 @@ out:
|
|||
if (fd_in != NULL) fclose(fd_in);
|
||||
if (fd_out != NULL) fclose(fd_out);
|
||||
|
||||
// If a replacement occured, delete existing file and use the new one
|
||||
// If a replacement occurred, delete existing file and use the new one
|
||||
if (ret != NULL) {
|
||||
// We're in Windows text mode => Remove CRs if requested
|
||||
fd_in = _wfopen(wtmpname, L"rb");
|
||||
|
|
|
@ -130,7 +130,7 @@ static int64_t last_iso_blocking_status;
|
|||
/*
|
||||
* The following is used to allocate slots within the progress bar
|
||||
* 0 means unused (no operation or no progress allocated to it)
|
||||
* +n means allocate exactly n bars (n percents of the progress bar)
|
||||
* +n means allocate exactly n bars (n percent of the progress bar)
|
||||
* -n means allocate a weighted slot of n from all remaining
|
||||
* bars. Eg if 80 slots remain and the sum of all negative entries
|
||||
* is 10, -4 will allocate 4/10*80 = 32 bars (32%) for OP progress
|
||||
|
@ -207,7 +207,7 @@ static BOOL DefineClusterSizes(void)
|
|||
}
|
||||
|
||||
// FAT 32
|
||||
// > 32GB FAT32 is not supported by MS and FormatEx but is achieved using fat32fomat
|
||||
// > 32GB FAT32 is not supported by MS and FormatEx but is achieved using fat32format
|
||||
// See: http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm
|
||||
// < 32 MB FAT32 is not allowed by FormatEx, so we don't bother
|
||||
|
||||
|
@ -984,7 +984,7 @@ BOOL CALLBACK ISOProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
UpdateWindow(hDlg);
|
||||
return TRUE;
|
||||
case UM_ISO_EXIT:
|
||||
// Just hide and recentrer the dialog
|
||||
// Just hide and recenter the dialog
|
||||
ShowWindow(hDlg, SW_HIDE);
|
||||
iso_op_in_progress = FALSE;
|
||||
return TRUE;
|
||||
|
@ -1804,7 +1804,7 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
|||
uprintf("\r\n");
|
||||
GetUSBDevices(DeviceNum);
|
||||
if (!IS_ERROR(FormatStatus)) {
|
||||
// This is the only way to achieve instantenous progress transition to 100%
|
||||
// This is the only way to achieve instantanenous progress transition to 100%
|
||||
SendMessage(hProgress, PBM_SETRANGE, 0, ((MAX_PROGRESS+1)<<16) & 0xFFFF0000);
|
||||
SendMessage(hProgress, PBM_SETPOS, (MAX_PROGRESS+1), 0);
|
||||
SendMessage(hProgress, PBM_SETRANGE, 0, (MAX_PROGRESS<<16) & 0xFFFF0000);
|
||||
|
|
12
src/rufus.rc
12
src/rufus.rc
|
@ -30,7 +30,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
IDD_DIALOG DIALOGEX 12, 12, 206, 329
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Rufus v1.3.4.256"
|
||||
CAPTION "Rufus v1.3.4.257"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
|
||||
|
@ -63,7 +63,7 @@ BEGIN
|
|||
COMBOBOX IDC_DISK_ID,119,246,73,30,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Add fixes for old BIOSes (extra partition, align, etc.)",IDC_EXTRA_PARTITION,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,235,184,10
|
||||
CONTROL "List fixed (non-flash) or unpartitionned USB disks",IDC_ENABLE_FIXED_DISKS,
|
||||
CONTROL "List fixed (non-flash) or unpartitioned USB disks",IDC_ENABLE_FIXED_DISKS,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,222,185,10
|
||||
PUSHBUTTON "Log",IDC_LOG,62,291,18,14
|
||||
END
|
||||
|
@ -278,8 +278,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,3,4,256
|
||||
PRODUCTVERSION 1,3,4,256
|
||||
FILEVERSION 1,3,4,257
|
||||
PRODUCTVERSION 1,3,4,257
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -296,13 +296,13 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "1.3.4.256"
|
||||
VALUE "FileVersion", "1.3.4.257"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2013 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "1.3.4.256"
|
||||
VALUE "ProductVersion", "1.3.4.257"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -94,7 +94,7 @@ SysType msdos_systypes[] = {
|
|||
{ 0x88, N_("Linux Plaintext") },
|
||||
{ 0x8e, N_("Linux LVM") },
|
||||
{ 0x93, N_("Amoeba") },
|
||||
/*This guys created a seperate partition for badblocks?! */
|
||||
/*This guys created a separate partition for badblocks?! */
|
||||
{ 0x94, N_("Amoeba BBT") },
|
||||
{ 0x9f, N_("BSD/OS") },
|
||||
{ 0xa0, N_("Thinkpad Hibernation") },
|
||||
|
|
|
@ -133,7 +133,7 @@ BOOL InstallSyslinux(DWORD drive_index, char drive_letter)
|
|||
goto out;
|
||||
}
|
||||
|
||||
uprintf("Succesfully wrote '%s'\n", ldlinux_sys);
|
||||
uprintf("Successfully wrote '%s'\n", ldlinux_sys);
|
||||
if (dt != DT_ISO)
|
||||
UpdateProgress(OP_DOS, -1.0f);
|
||||
|
||||
|
@ -203,7 +203,7 @@ BOOL InstallSyslinux(DWORD drive_index, char drive_letter)
|
|||
goto out;
|
||||
}
|
||||
|
||||
uprintf("Succesfully wrote Syslinux boot record\n");
|
||||
uprintf("Successfully wrote Syslinux boot record\n");
|
||||
|
||||
if (dt == DT_SYSLINUX_V5) {
|
||||
fd = fopen(ldlinux_c32, "rb");
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
/*
|
||||
* setadv.c
|
||||
*
|
||||
* (Over)write a data item in the auxilliary data vector. To
|
||||
* (Over)write a data item in the auxiliary data vector. To
|
||||
* delete an item, set its length to zero.
|
||||
*
|
||||
* Return 0 on success, -1 on error, and set errno.
|
||||
|
|
Loading…
Reference in a new issue