Commit Graph

13 Commits

Author SHA1 Message Date
Pete Batard 8a5a5a318a
[misc] improve readability of error code handling
* Also don't pass a read size value in WriteFileWithRetry() if we don't use it.
2024-04-01 02:16:41 +01:00
Pete Batard 4617f91e3b
[misc] introduce hImageOption and ComboBox_GetCurItemData() to simplify code
* Also add retry to ms-sys' write_sectors()
2020-07-17 21:51:15 +01:00
Pete Batard 4c816a519e
[misc] update license URLs and align ms-sys's write_data buffer to 4K
* Also remove some obsolete TODOs
2019-09-06 11:32:37 +01:00
Pete Batard d4a663991b
[core] report write errors more explicitly
* Also issue a port cycle on ERROR_NOT_READY
* Also run a check for conflicting processes during write retries
2019-04-09 21:37:08 +01:00
Pete Batard aa4baab194 [core] add a workaround for >1TB HDDs that mistakenly report short writes
* It appears that 1.5TB and 2TB HDDs, accessed trough some Seagate ow WD USB ↔ SATA
  controllers, can report that 0 bytes were written on WriteFile(), even though all
  the data was effectively written. 1TB HDDs, accessed through the same controller,
  do not report this issue. So add a workaround for that.
* Also see #787
2016-09-06 18:31:30 +01:00
Pete Batard e76f60a3e8 [misc] use the more univerasal _mm_alloc() instead of _aligned_malloc()
* Also ensure that our buffers are aligned
* Also remove the use of static buffers in ms-sys
2016-06-10 12:42:43 +01:00
Pete Batard b77561bb9b [ms-sys] update ms-sys to current
* NB: This includes an updated Syslinux MBR
2016-01-07 15:49:58 +00:00
Pete Batard 5004374277 [misc] update to VS2015 and fix VS code analysis issues
* Also update Bled to latest, as well as build scripts
* Note: Considering that Visual Studio 2015 is both freely and legally
  available for anyone who wants to use it to compile Rufus, starting
  with this commit, I will NOT be supporting any other version of Visual
  Studio but 2015.
2015-08-10 23:30:23 +01:00
Pete Batard b830c040d2 [misc] fix XP compatibility
* MinGW's gcc 4.9.2 seems to implement a broken "%lld" format 64 bit integer is
  followed by more variables and the app executes on XP => use PRI macros
* Also fix partition ID being ignored when using Rufus MBR
* Also fix some global vars shadowing and add other improvements
2015-01-28 23:22:11 +00:00
Pete Batard cd5665881c [core] drive handling improvements
* Use IOCTL_DISK_UPDATE_PROPERTIES after partitioning
* Use IOCTL_DISK_DELETE_DRIVE_LAYOUT to invalidate partitions before formatting
* Fix handling of unpartitioned drives
* Increase delay after partitioning
* All of the above should help with the infamous #122
* Also fix display of error messages in ms-sys' file.c as well as stdio.c
* Also add commandline option -f to list fixed drives
2013-06-25 02:55:25 +01:00
Pete Batard 8dc5429d9f [misc] various small improvements
* Less scary message from bad blocks
* Better error report for read/write_sectors
* Fix a WDK warning
2012-11-03 17:22:28 +00:00
Pete Batard a9c47a4922 [bb] fix bad blocks check for 64 bit
* 32 bit bad blocks check is too limited for large drives
  and result in erroneous computations
* 32 bit also means that 2TB would be absolute limit, which
  may be too low in case for USB HDD checks
* This fix makes bad blocks check and related calls 64 bit compliant
* also improve on bad block reports
2012-03-03 22:59:58 +00:00
Pete Batard dc010cc418 [misc] separated ms-sys dependency from application
* set ms-sys to be built as a library
* also removed unused code from badblocks.c
2012-01-11 00:05:16 +00:00
Renamed from src/file.c (Browse further)