[core] use custom partition type for old BIOS fix

* We will need that when we fix #191
* Also improve make sys_types.h more comprehensive and fix a small loc issue
This commit is contained in:
Pete Batard 2014-01-14 20:10:09 +00:00
parent 945194eebd
commit db41c1e63e
5 changed files with 91 additions and 49 deletions

View File

@ -5613,7 +5613,7 @@ t MSG_173 "Faça clic para selecionar..."
# The following will appear in the about dialog # The following will appear in the about dialog
t MSG_174 "Rufus - O utilitário de formatação USB mais seguro" t MSG_174 "Rufus - O utilitário de formatação USB mais seguro"
t MSG_175 "Versão %d.%d.%d (Build %d)" t MSG_175 "Versão %d.%d.%d (Build %d)"
t MSG_176 "Tradução para Português: Fernando Baptista <mailto:gbatold@gmail.com>" t MSG_176 "Tradução para Português: Fernando Baptista mailto:gbatold@gmail.com"
t MSG_177 "Para reportar bugs ou sugerir melhoras, dirija-se a:" t MSG_177 "Para reportar bugs ou sugerir melhoras, dirija-se a:"
t MSG_178 "Direitos de autor adicionais:" t MSG_178 "Direitos de autor adicionais:"
t MSG_179 "Politica de atualização:" t MSG_179 "Politica de atualização:"

View File

@ -886,7 +886,7 @@ BOOL CreatePartition(HANDLE hDrive, int partition_style, int file_system, BOOL m
DriveLayoutEx.PartitionEntry[1].RewritePartition = TRUE; DriveLayoutEx.PartitionEntry[1].RewritePartition = TRUE;
DriveLayoutEx.PartitionEntry[1].Mbr.BootIndicator = FALSE; DriveLayoutEx.PartitionEntry[1].Mbr.BootIndicator = FALSE;
DriveLayoutEx.PartitionEntry[1].Mbr.HiddenSectors = SelectedDrive.Geometry.SectorsPerTrack*SelectedDrive.Geometry.BytesPerSector; DriveLayoutEx.PartitionEntry[1].Mbr.HiddenSectors = SelectedDrive.Geometry.SectorsPerTrack*SelectedDrive.Geometry.BytesPerSector;
DriveLayoutEx.PartitionEntry[1].Mbr.PartitionType = DriveLayoutEx.PartitionEntry[0].Mbr.PartitionType + 0x10; // Hidden whatever DriveLayoutEx.PartitionEntry[1].Mbr.PartitionType = RUFUS_EXTRA_PARTITION_TYPE;
} }
// For the remaining partitions, PartitionStyle & PartitionType have already // For the remaining partitions, PartitionStyle & PartitionType have already
// been zeroed => already set to MBR/unused // been zeroed => already set to MBR/unused

View File

@ -22,6 +22,8 @@
#pragma once #pragma once
#define RUFUS_EXTRA_PARTITION_TYPE 0xea
char* GetPhysicalName(DWORD DriveIndex); char* GetPhysicalName(DWORD DriveIndex);
HANDLE GetPhysicalHandle(DWORD DriveIndex, BOOL bWriteAccess, BOOL bLockDrive); HANDLE GetPhysicalHandle(DWORD DriveIndex, BOOL bWriteAccess, BOOL bLockDrive);
char* GetLogicalName(DWORD DriveIndex, BOOL bKeepTrailingBackslash, BOOL bSilent); char* GetLogicalName(DWORD DriveIndex, BOOL bKeepTrailingBackslash, BOOL bSilent);

View File

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 329 IDD_DIALOG DIALOGEX 12, 12, 206, 329
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.4.2.379" CAPTION "Rufus v1.4.2.380"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,291,50,14 DEFPUSHBUTTON "Start",IDC_START,94,291,50,14
@ -288,8 +288,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,2,379 FILEVERSION 1,4,2,380
PRODUCTVERSION 1,4,2,379 PRODUCTVERSION 1,4,2,380
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -306,13 +306,13 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.4.2.379" VALUE "FileVersion", "1.4.2.380"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2014 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2014 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe" VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.4.2.379" VALUE "ProductVersion", "1.4.2.380"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -29,9 +29,11 @@ typedef struct {
#define N_(String) String #define N_(String) String
/*
/* The system types for msdos partition tables * File system types for MBR partition tables
* Needed for lfdisk and some interface improvements * See http://en.wikipedia.org/wiki/Partition_type
* Note: If googling APTI (Alternative Partition Table Identification)
* doesn't return squat, then IT ISN'T A REAL THING!!
*/ */
SysType msdos_systypes[] = { SysType msdos_systypes[] = {
{ 0x00, N_("Empty") }, { 0x00, N_("Empty") },
@ -59,45 +61,68 @@ SysType msdos_systypes[] = {
{ 0x1b, N_("Hidden FAT32") }, { 0x1b, N_("Hidden FAT32") },
{ 0x1c, N_("Hidden FAT32 LBA") }, { 0x1c, N_("Hidden FAT32 LBA") },
{ 0x1e, N_("Hidden FAT16 LBA") }, { 0x1e, N_("Hidden FAT16 LBA") },
{ 0x20, N_("Windows Mobile XIP") },
{ 0x21, N_("SpeedStor") },
{ 0x23, N_("Windows Mobile XIP") },
{ 0x24, N_("NEC DOS") }, { 0x24, N_("NEC DOS") },
{ 0x25, N_("Windows Mobile IMGFS") },
{ 0x27, N_("Hidden NTFS WinRE") }, { 0x27, N_("Hidden NTFS WinRE") },
{ 0x39, N_("Plan 9") }, { 0x39, N_("Plan 9") },
{ 0x3c, N_("PMagic recovery") }, { 0x3c, N_("PMagic Recovery") },
{ 0x40, N_("Venix 80286") }, { 0x40, N_("Venix 80286") },
{ 0x41, N_("PPC PReP Boot") }, { 0x41, N_("PPC PReP Boot") },
{ 0x42, N_("SFS") }, { 0x42, N_("SFS") },
{ 0x4d, N_("QNX4.x") }, { 0x4d, N_("QNX4.x") },
{ 0x4e, N_("QNX4.x 2nd Partition") }, { 0x4e, N_("QNX4.x") },
{ 0x4f, N_("QNX4.x 3rd Partition") }, { 0x4f, N_("QNX4.x") },
{ 0x50, N_("OnTrack DM") }, { 0x50, N_("OnTrack DM") },
{ 0x51, N_("OnTrackDM6 Aux1") }, { 0x51, N_("OnTrack DM") },
{ 0x52, N_("CP/M") }, { 0x52, N_("CP/M") },
{ 0x53, N_("OnTrackDM6 Aux3") }, { 0x53, N_("OnTrack DM") },
{ 0x54, N_("OnTrack DM6") }, { 0x54, N_("OnTrack DM") },
{ 0x55, N_("EZ Drive") }, { 0x55, N_("EZ Drive") },
{ 0x56, N_("Golden Bow") }, { 0x56, N_("Golden Bow") },
{ 0x5c, N_("Priam Edisk") }, { 0x5c, N_("Priam EDisk") },
{ 0x61, N_("SpeedStor") }, { 0x61, N_("SpeedStor") },
{ 0x63, N_("GNU HURD/SysV") }, { 0x63, N_("GNU HURD/SysV") },
{ 0x64, N_("Netware 286") }, { 0x64, N_("Netware") },
{ 0x65, N_("Netware 386") }, { 0x65, N_("Netware") },
{ 0x70, N_("DiskSec MultiBoot") }, { 0x66, N_("Netware") },
{ 0x67, N_("Netware") },
{ 0x68, N_("Netware") },
{ 0x69, N_("Netware") },
{ 0x70, N_("DiskSecure MultiBoot") },
{ 0x75, N_("PC/IX") }, { 0x75, N_("PC/IX") },
{ 0x80, N_("Minix <1.4a") }, { 0x77, N_("Novell") },
{ 0x81, N_("Minix >1.4b") }, { 0x78, N_("XOSL") },
{ 0x82, N_("Linux Swap") }, { 0x7e, N_("F.I.X.") },
{ 0x83, N_("Linux") }, { 0x7e, N_("AODPS") },
{ 0x84, N_("OS/2 Hidden C:") }, { 0x80, N_("Minix") },
{ 0x85, N_("Linux Extended") }, { 0x81, N_("Minix") },
{ 0x82, N_("GNU/Linux Swap") },
{ 0x83, N_("GNU/Linux") },
{ 0x84, N_("Windows Hibernation") },
{ 0x85, N_("GNU/Linux Extended") },
{ 0x86, N_("NTFS Volume Set") }, { 0x86, N_("NTFS Volume Set") },
{ 0x87, N_("NTFS Volume Set") }, { 0x87, N_("NTFS Volume Set") },
{ 0x88, N_("Linux Plaintext") }, { 0x88, N_("GNU/Linux Plaintext") },
{ 0x8e, N_("Linux LVM") }, { 0x8d, N_("FreeDOS Hidden FAT12") },
{ 0x93, N_("Amoeba") }, { 0x8e, N_("GNU/Linux LVM") },
/*This guys created a separate partition for badblocks?! */ { 0x90, N_("FreeDOS Hidden FAT16") },
{ 0x94, N_("Amoeba BBT") }, { 0x91, N_("FreeDOS Hidden Extended") },
{ 0x92, N_("FreeDOS Hidden FAT16") },
{ 0x93, N_("GNU/Linux Hidden") },
{ 0x96, N_("CHRP ISO-9660") },
{ 0x97, N_("FreeDOS Hidden FAT32") },
{ 0x98, N_("FreeDOS Hidden FAT32") },
{ 0x9a, N_("FreeDOS Hidden FAT16") },
{ 0x9b, N_("FreeDOS Hidden Extended") },
{ 0x9f, N_("BSD/OS") }, { 0x9f, N_("BSD/OS") },
{ 0xa0, N_("Thinkpad Hibernation") }, { 0xa0, N_("Hibernation") },
{ 0xa1, N_("Hibernation") },
{ 0xa2, N_("SpeedStor") },
{ 0xa3, N_("SpeedStor") },
{ 0xa4, N_("SpeedStor") },
{ 0xa5, N_("FreeBSD") }, { 0xa5, N_("FreeBSD") },
{ 0xa6, N_("OpenBSD") }, { 0xa6, N_("OpenBSD") },
{ 0xa7, N_("NeXTSTEP") }, { 0xa7, N_("NeXTSTEP") },
@ -105,37 +130,52 @@ SysType msdos_systypes[] = {
{ 0xa9, N_("NetBSD") }, { 0xa9, N_("NetBSD") },
{ 0xab, N_("Darwin Boot") }, { 0xab, N_("Darwin Boot") },
{ 0xaf, N_("HFS/HFS+") }, { 0xaf, N_("HFS/HFS+") },
{ 0xb0, N_("BootStar Dummy") },
{ 0xb1, N_("QNX") },
{ 0xb2, N_("QNX") },
{ 0xb3, N_("QNX") },
{ 0xb4, N_("SpeedStor") },
{ 0xb6, N_("SpeedStor") },
{ 0xb7, N_("BSDI") }, { 0xb7, N_("BSDI") },
{ 0xb8, N_("BSDI Swap") }, { 0xb8, N_("BSDI Swap") },
/* Beware of the Hidden wizard */ { 0xbb, N_("BootWizard Hidden") },
{ 0xbb, N_("Boot Wizard Hidden") }, { 0xbc, N_("Acronis SZ") },
{ 0xbe, N_("Solaris Boot") }, { 0xbe, N_("Solaris Boot") },
{ 0xbf, N_("Solaris") }, { 0xbf, N_("Solaris") },
{ 0xc1, N_("DRDOS/2 FAT12") }, { 0xc0, N_("Secured FAT") },
{ 0xc4, N_("DRDOS/2 smFAT16") }, { 0xc1, N_("DR DOS FAT12") },
{ 0xc6, N_("DRDOS/2 FAT16") }, { 0xc2, N_("GNU/Linux Hidden") },
/* Reminds me of Rush - 2112 */ { 0xc3, N_("GNU/Linux Hidden Swap") },
{ 0xc4, N_("DR DOS FAT16") },
{ 0xc4, N_("DR DOS Extended") },
{ 0xc6, N_("DR DOS FAT16") },
{ 0xc7, N_("Syrinx") }, { 0xc7, N_("Syrinx") },
{ 0xda, N_("Non-FS Data") }, { 0xda, N_("Non-FS Data") },
{ 0xdb, N_("CP/M") }, { 0xdb, N_("CP/M") },
{ 0xde, N_("Dell Utility") }, { 0xde, N_("Dell Utility") },
/* Should 0x20 be DontBootIt then? */
{ 0xdf, N_("BootIt") }, { 0xdf, N_("BootIt") },
{ 0xe1, N_("DOS Access") }, { 0xe0, N_("ST AVFS") },
{ 0xe3, N_("DOS R/O") }, { 0xe1, N_("SpeedStor") },
/*I sense some strange déjà vu */ { 0xe3, N_("SpeedStor") },
{ 0xe4, N_("SpeedStor") }, { 0xe4, N_("SpeedStor") },
{ 0xfb, N_("VMware VMFS") }, { 0xe6, N_("SpeedStor") },
{ 0xfc, N_("VMware VMKCORE") }, { 0xe8, N_("LUKS") },
{ 0xeb, N_("BeOS") }, { 0xea, N_("Rufus Extra") },
{ 0xee, N_("GPT") }, { 0xeb, N_("BeOS/Haiku") },
{ 0xec, N_("SkyFS") },
{ 0xed, N_("GPT Hybrid MBR") },
{ 0xee, N_("GPT Protective MBR") },
{ 0xef, N_("EFI FAT") }, { 0xef, N_("EFI FAT") },
{ 0xf0, N_("Linux/PA-RISC Boot") }, { 0xf0, N_("PA-RISC Boot") },
{ 0xf1, N_("SpeedStor") }, { 0xf1, N_("SpeedStor") },
{ 0xf2, N_("DOS secondary") }, { 0xf2, N_("DOS secondary") },
/* Are these guys trying for a Guinness record or something? */ { 0xf3, N_("SpeedStor") },
{ 0xf4, N_("SpeedStor") }, { 0xf4, N_("SpeedStor") },
{ 0xfd, N_("Linux RAID Auto") }, { 0xf6, N_("SpeedStor") },
{ 0xfa, N_("Bochs") },
{ 0xfb, N_("VMware VMFS") },
{ 0xfc, N_("VMware VMKCORE") },
{ 0xfd, N_("GNU/Linux RAID Auto") },
{ 0xfe, N_("LANstep") }, { 0xfe, N_("LANstep") },
{ 0xff, N_("XENIX BBT") }, { 0xff, N_("XENIX BBT") },
{ 0, NULL } { 0, NULL }