mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 03:06:56 -04:00
[ext2fs] improve formatting speed
* Fix use of EXT2_BLOCK_SIZE() instead of EXT2_INODE_SIZE() during inode initialization, that made us zero way many more blocks than was needed. * Also disable sparse_super feature and improve block setup. * Also explicitly use IS_POWER_OF_2 macro where required.
This commit is contained in:
parent
35af4cbacb
commit
9edd7492db
4 changed files with 22 additions and 19 deletions
|
@ -641,8 +641,7 @@ out:
|
|||
static BOOL FormatPartition(DWORD DriveIndex, uint64_t PartitionOffset, DWORD UnitAllocationSize, USHORT FSType, LPCSTR Label, DWORD Flags)
|
||||
{
|
||||
if ((DriveIndex < 0x80) || (DriveIndex > 0x100) || (FSType >= FS_MAX) ||
|
||||
// The following validates that UnitAllocationSize is a power of 2
|
||||
((UnitAllocationSize != 0) && (UnitAllocationSize & (UnitAllocationSize - 1)))) {
|
||||
((UnitAllocationSize != 0) && (!IS_POWER_OF_2(UnitAllocationSize)))) {
|
||||
ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | ERROR_INVALID_PARAMETER;
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue