mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-19 17:35:10 -04:00
[misc] set default size for ReFS and fix multiple other issues
* ReFS only applies for drives that are larger than 512MB * Also fix error handling and messages in format.c * Also add Alt-Q cheat mode for proper size units, and improve human readable size output
This commit is contained in:
parent
0def2bacef
commit
3462ae1062
5 changed files with 66 additions and 44 deletions
|
@ -188,7 +188,8 @@ char* SizeToHumanReadable(uint64_t size, BOOL log, BOOL fake_units)
|
|||
safe_sprintf(str_size, sizeof(str_size), "%d%s", i_size, _msg_table[MSG_020+suffix-MSG_000]);
|
||||
}
|
||||
} else {
|
||||
safe_sprintf(str_size, sizeof(str_size), "%0.1f %s", hr_size, _msg_table[MSG_020+suffix-MSG_000]);
|
||||
safe_sprintf(str_size, sizeof(str_size), (hr_size * 10.0 - (floor(hr_size) * 10.0)) < 1.0?
|
||||
"%0.0f %s":"%0.1f %s", hr_size, _msg_table[MSG_020+suffix-MSG_000]);
|
||||
}
|
||||
return str_size;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue