1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00
Commit graph

7 commits

Author SHA1 Message Date
Pete Batard
67d324f82b
[extfs] fix inodes not being initialized above 4 GB
* So, as it happens, when assigning the product of two 32-bit variables into a 64-bit one,
  compilers default to being *DUMB* and, against all reasonable expectations, do not perform
  that multiplication as a 64-bit operation (even when the code is compiled as x64). Wow,
  that's really great decision making by compiler designers if I ever saw some... Whoever
  decided that C developers would much rather want truncation and 32-bit overflows, instead
  of the expected *LOGICAL* behaviour of conducting arithmetic operations as 64-bit when the
  result will be assigned to a 64-bit variable, need to be condemned to a lifetime of trying
  to help elderly folks trying to conduct simple computing tasks as a punishment...
  Anyhoo, nt_write_blk()'s offset.QuadPart = block * channel->block_size + nt_data->offset
  was overflowing 32-bit as soon as block * channel->block_size went over the 4 GB mark,
  with the disastrous results one can expect. Considering that this is code we practically
  lifted verbatim from e2fsprogs, I guess e2fsprogs' NT I/O manager was never properly
  tested with anything larger than a 4 GB. Awesome!
* We fix the above by doing what unix_io.c does and setting the 32-bit read/write_blk()
  calls to be wrappers around their 64-bit counterpart (since, once you deal with a 64-bit
  block variable, the computation is conducted as 64-bit).
* Also remove a bunch of stuff we don't need from config.h
* Closes #1396
2020-02-12 16:27:32 +00:00
Pete Batard
bf8d888b21
[ext2fs] fix creation of persistent partitions for pre-1703 platforms
* Windows platforms prior to Windows 10 1703 cannot access any logical partition besides the
  first one (we don't even get a volume for those).
* This fix enables the use of physical + offset for ext# formatting to work around this,
  which is file since we don't actually need to mount the partition.
* Also fix ext2fs_open2() not handling normalized versions of Windows drive paths ("\\?\...")
* Also fix an issue where we would make the drive letter unavailable after formatting a
  standalone partition to ext#.
* Also ensure that we return an error if the drive we attempt to locate a partition on
  through an offset does not match the currently selected one.
* Also remove some unused calls in drive.c.
* Closes #1374
2019-09-14 23:33:46 +01:00
Pete Batard
5ae6e4f494
[ext2fs] improve error reporting
* Also clean up VDS error messages
2019-05-02 15:41:42 +01:00
Pete Batard
ccf0f1bf3c
[ext2fs] add journal support for ext3 formatting
* Also clean up code, handle errors and fix issues
2019-04-15 17:04:39 +01:00
Pete Batard
5159b1eb87
[ext2fs] fix Coverity warnings 2019-04-13 17:17:23 +01:00
Pete Batard
cec443ef61
[ext2fs] update to latest e2fsprogs
* e2fsprogs commit [cecc2bc78b39ddcd34a819a4d7e7cd30897958cb]
* Also add LGPLv2 license text
2019-04-13 14:52:29 +01:00
Pete Batard
cda716c1ff
[ext2fs] initial ext2fs support 2019-04-12 21:32:40 +01:00