aboutsummaryrefslogtreecommitdiff
path: root/lib/common/parse_size.c
AgeCommit message (Collapse)Author
2020-03-01Fix: Replace bit shifts in parse_size with SZ_MUL_OVDavid Oberhollenzer
On 32 bit systems, size_t is a 32 bit integer and doing 64 bit shifts won't do us any good. So instead, use the existing size_t multiply and catch overflow macros. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2020-01-06Cleanup: use parse_size function to parse compressor optionsDavid Oberhollenzer
The XZ option parser had a similar function to parse_size. This commit removes the other implementation and extends parse_size with the one missing feature, i.e. allowing a '%' suffix for a relative value. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2020-01-02Support parsing [device] block size argument with SI suffixDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>