kernel: tweak thresholds for data size->string conversion

This commit is contained in:
2023-07-08 22:13:49 +01:00
parent fa41e50f56
commit dd6e49e8a6

View File

@@ -50,7 +50,7 @@ void data_size_to_string(size_t value, char *out, size_t outsz)
size_t def_count = sizeof(k_magnitudes) / sizeof(struct magnitude); size_t def_count = sizeof(k_magnitudes) / sizeof(struct magnitude);
for (size_t i = 0; i < def_count; i++) { for (size_t i = 0; i < def_count; i++) {
if (value > k_magnitudes[i].threshold) { if (value >= k_magnitudes[i].threshold) {
size_t big, small; size_t big, small;
convert(&big, &small, value, k_magnitudes[i].threshold); convert(&big, &small, value, k_magnitudes[i].threshold);
if (small) { if (small) {