Version v0.3.35 - Convert to decimal units (1000-based) to match system tools, add posix_fallocate for guaranteed space allocation, use f_bavail for accurate space reporting, add drive info to Pad Management header

This commit is contained in:
2025-12-20 10:02:15 -04:00
parent cf52274c2c
commit b969590625
7 changed files with 74 additions and 53 deletions

View File

@@ -519,13 +519,13 @@ uint64_t parse_size_string(const char* size_str) {
}
if (strcmp(unit, "K") == 0 || strcmp(unit, "KB") == 0) {
multiplier = 1024ULL;
multiplier = 1000ULL;
} else if (strcmp(unit, "M") == 0 || strcmp(unit, "MB") == 0) {
multiplier = 1024ULL * 1024ULL;
multiplier = 1000ULL * 1000ULL;
} else if (strcmp(unit, "G") == 0 || strcmp(unit, "GB") == 0) {
multiplier = 1024ULL * 1024ULL * 1024ULL;
multiplier = 1000ULL * 1000ULL * 1000ULL;
} else if (strcmp(unit, "T") == 0 || strcmp(unit, "TB") == 0) {
multiplier = 1024ULL * 1024ULL * 1024ULL * 1024ULL;
multiplier = 1000ULL * 1000ULL * 1000ULL * 1000ULL;
} else {
return 0; // Invalid unit
}