1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:27:35 +00:00

AK+Userland: Return String from human_readable_size() functions

This commit is contained in:
Sam Atkins 2024-01-24 12:16:32 +00:00 committed by Andreas Kling
parent 7e8cfb60eb
commit 388856dc7e
7 changed files with 23 additions and 23 deletions

View file

@ -405,9 +405,9 @@ static bool print_filesystem_object(ByteString const& path, ByteString const& na
printf(" %4u,%4u ", major(st.st_rdev), minor(st.st_rdev));
} else {
if (flag_human_readable) {
printf(" %10s ", human_readable_size(st.st_size).characters());
printf(" %10s ", human_readable_size(st.st_size).to_byte_string().characters());
} else if (flag_human_readable_si) {
printf(" %10s ", human_readable_size(st.st_size, AK::HumanReadableBasedOn::Base10).characters());
printf(" %10s ", human_readable_size(st.st_size, AK::HumanReadableBasedOn::Base10).to_byte_string().characters());
} else {
printf(" %10" PRIu64 " ", (uint64_t)st.st_size);
}