diff --git a/res/syslinux/ldlinux.bss b/res/syslinux/ldlinux.bss index 884c5a8e..b33699fd 100644 Binary files a/res/syslinux/ldlinux.bss and b/res/syslinux/ldlinux.bss differ diff --git a/res/syslinux/ldlinux.sys b/res/syslinux/ldlinux.sys index cee0f82f..6aa59cb7 100644 Binary files a/res/syslinux/ldlinux.sys and b/res/syslinux/ldlinux.sys differ diff --git a/res/syslinux/readme.txt b/res/syslinux/readme.txt index a8e0e98b..f2c7047f 100644 --- a/res/syslinux/readme.txt +++ b/res/syslinux/readme.txt @@ -1,2 +1,2 @@ -o ldlinux.bss and ldlinux.sys are from syslinux-4.05/core/ +o ldlinux.bss and ldlinux.sys are from syslinux-4.06/core/ http://www.kernel.org/pub/linux/utils/boot/syslinux/ \ No newline at end of file diff --git a/src/format.c b/src/format.c index 63df05fb..01591617 100644 --- a/src/format.c +++ b/src/format.c @@ -421,7 +421,7 @@ static BOOL FormatFAT32(DWORD DriveIndex) strncpy((char*)pFAT32BootSect->sOEMName, "MSWIN4.1", 8); pFAT32BootSect->wBytsPerSec = (WORD) BytesPerSect; - ClusterSize = ComboBox_GetItemData(hClusterSize, ComboBox_GetCurSel(hClusterSize)); + ClusterSize = (DWORD)ComboBox_GetItemData(hClusterSize, ComboBox_GetCurSel(hClusterSize)); SectorsPerCluster = ClusterSize / BytesPerSect; pFAT32BootSect->bSecPerClus = (BYTE) SectorsPerCluster ; diff --git a/src/iso.c b/src/iso.c index 9a7083ed..1938cdd4 100644 --- a/src/iso.c +++ b/src/iso.c @@ -459,7 +459,7 @@ out: iso_blocking_status = -1; if (scan_only) { // Remove trailing spaces from the label - for (j=safe_strlen(iso_report.label)-1; ((j>=0)&&(isspace(iso_report.label[j]))); j--) + for (j=(int)safe_strlen(iso_report.label)-1; ((j>=0)&&(isspace(iso_report.label[j]))); j--) iso_report.label[j] = 0; // We use the fact that UDF_BLOCKSIZE and ISO_BLOCKSIZE are the same here iso_report.projected_size = total_blocks * ISO_BLOCKSIZE; diff --git a/src/rufus.rc b/src/rufus.rc index 2682ffdc..b0b55b1e 100644 --- a/src/rufus.rc +++ b/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.186" +CAPTION "Rufus v1.2.0.187" 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 "http://rufus.akeo.ie",IDC_ABOUT_RUFUS_URL, "SysLink",WS_TABSTOP,46,47,114,9 - LTEXT "Version 1.2.0 (Build 186)",IDC_STATIC,46,19,78,8 + LTEXT "Version 1.2.0 (Build 187)",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,186 - PRODUCTVERSION 1,2,0,186 + FILEVERSION 1,2,0,187 + PRODUCTVERSION 1,2,0,187 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -255,13 +255,13 @@ BEGIN BEGIN VALUE "CompanyName", "akeo.ie" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "1.2.0.186" + VALUE "FileVersion", "1.2.0.187" 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.186" + VALUE "ProductVersion", "1.2.0.187" END END BLOCK "VarFileInfo" diff --git a/src/syslinux/libinstaller/syslxint.h b/src/syslinux/libinstaller/syslxint.h index f6d9a4ef..5872c7db 100644 --- a/src/syslinux/libinstaller/syslxint.h +++ b/src/syslinux/libinstaller/syslxint.h @@ -23,6 +23,23 @@ # define X86_MEM 0 #endif +#ifdef __GNUC__ +# ifdef __MINGW32__ + /* gcc 4.7 miscompiles packed structures in MS-bitfield mode */ +# define GNUC_PACKED __attribute__((packed,gcc_struct)) +# else +# define GNUC_PACKED __attribute__((packed)) +# endif +# define PRAGMA_BEGIN_PACKED +# define PRAGMA_END_PACKED +#elif defined(_MSC_VER) +# define GNUC_PACKED +# define PRAGMA_BEGIN_PACKED __pragma(pack(push, 1)) +# define PRAGMA_END_PACKED __pragma(pack(pop)) +#else +# error "Need to define PACKED for this compiler" +#endif + /* * Access functions for littleendian numbers, possibly misaligned. */ @@ -187,11 +204,11 @@ struct ext_patch_area { }; /* Sector extent */ -#pragma pack(push, 1) +PRAGMA_BEGIN_PACKED struct syslinux_extent { uint64_t lba; uint16_t len; -}; +} GNUC_PACKED; /* FAT bootsector format, also used by other disk-based derivatives */ struct fat_boot_sector { @@ -219,7 +236,7 @@ struct fat_boot_sector { char VolumeLabel[11]; char FileSysType[8]; uint8_t Code[442]; - } bs16; + } GNUC_PACKED bs16; struct { uint32_t FATSz32; uint16_t ExtFlags; @@ -235,13 +252,13 @@ struct fat_boot_sector { char VolumeLabel[11]; char FileSysType[8]; uint8_t Code[414]; - } bs32; - }; + } GNUC_PACKED bs32; + } GNUC_PACKED; uint32_t bsMagic; uint16_t bsForwardPtr; uint16_t bsSignature; -}; +} GNUC_PACKED; /* NTFS bootsector format */ struct ntfs_boot_sector { @@ -274,8 +291,8 @@ struct ntfs_boot_sector { uint32_t bsMagic; uint16_t bsForwardPtr; uint16_t bsSignature; -}; -#pragma pack(pop) +} GNUC_PACKED; +PRAGMA_END_PACKED #define FAT_bsHead bsJump #define FAT_bsHeadLen offsetof(struct fat_boot_sector, bsBytesPerSec) diff --git a/src/syslinux/libinstaller/syslxmod.c b/src/syslinux/libinstaller/syslxmod.c index 08acb075..e2a66bc0 100644 --- a/src/syslinux/libinstaller/syslxmod.c +++ b/src/syslinux/libinstaller/syslxmod.c @@ -97,8 +97,6 @@ static inline void *ptr(void *img, uint16_t *offset_p) * Returns the number of modified bytes in ldlinux.sys if successful, * otherwise -1. */ -#define NADV 2 - int syslinux_patch(const sector_t *sectp, int nsectors, int stupid, int raid_mode, const char *subdir, const char *subvol)