SerenityOS / serenity

The Serenity Operating System 🐞
https://serenityos.org
BSD 2-Clause "Simplified" License
29.46k stars 3.14k forks source link

Utilities: Introduce the sizefmt utility #24571

Closed supercomputer7 closed 1 week ago

supercomputer7 commented 2 weeks ago

This utility takes a human-readable size and converts it into a raw integer that can be used on commandline utilities.

I want to see if this utility makes sense before I write a manual page with examples. This could be used for example on the utility from this PR #24570, but probably on other utilities in the system (like truncate).

supercomputer7 commented 2 weeks ago

Clang failed on conversion from u64 to unsigned, so I fixed this now :)

supercomputer7 commented 1 week ago

One small style nitpick (maybe).

Done!