summaryrefslogtreecommitdiffstats
path: root/lib/libutil/expand_number.c
Commit message (Collapse)AuthorAgeFilesLines
* Add #include <inttypes.h> for the strtoimax().kib2008-07-071-0/+1
| | | | | Submitted by: Jilles Tjoelker <jilles stack nl> MFC after: 3 days
* Constify the first argument to expand_number() so that it canjb2007-11-181-1/+1
| | | | be called with a const without the compiler grisling.
* - Fix strange for loop.pjd2007-09-051-6/+16
| | | | | | | | | Reported by: phk - While here, check the unit before calculating the actually number. This way we can return EINVAL for invalid unit instead of ERANGE. Approved by: re (kensmith)
* Implement expand_number(3), which is the opposite of humanize_number(3), ie.pjd2007-09-011-0/+89
a number in human-readable form is converted to int64_t, for example: 123b -> 123 10k -> 10240 16G -> 17179869184 First version submitted by: Eric Anderson <anderson@freebsd.org> Approved by: re (bmah)
OpenPOWER on IntegriCloud