Hi Simon,
I preferred not to use extended regex. + and ? is included in the
extended posix regexes [1]. I also prefer [0-9] over [:digit:],
because it is as clear and less characters, but I don't mind :).
Alright, let's go with the one using basic POSIX regexes.
atol() can return negative
--subbuf-size accepts sizes such as:
- 123 - 123
- 123k or 123K - 123 * 1024
- 123m or 123M - 123 * 1024 * 1024
- 123g or 123G - 123 * 1024 * 1024 * 1024
I don't really like using non-SI prefixes such as K, m or g
(well, in fact m is an SI prefix but for milli, not mega).
I think that
Normally I'd be the first to advocate k, M, G as powers of 10 and Ki, Mi,
Gi as powers of two (ISO/IEC 8-13:2008) but the kernel parameters use
exclusively K, M, and G in the powers of two sense, and I believe just about
every other part of Linux does also. We should thus, somewhat
2013/4/3 Simon Marchi simon.mar...@polymtl.ca
Normally I'd be the first to advocate k, M, G as powers of 10 and Ki,
Mi, Gi as powers of two (ISO/IEC 8-13:2008) but the kernel parameters
use exclusively K, M, and G in the powers of two sense, and I believe just
about every other part
Hi Simon,
I wanted to add some unit tests for parse_human_size, but the current
test system does not make it easy. They will come later.
Could you describe the issues you had on a separate thread so we can
further discuss it?
Here a few comments on your patch:
+ char *buffer =
On 2 April 2013 22:39, Christian Babeux christian.bab...@efficios.com wrote:
Hi Simon,
I wanted to add some unit tests for parse_human_size, but the current
test system does not make it easy. They will come later.
Could you describe the issues you had on a separate thread so we can
further
On 2 April 2013 22:52, Raphaël Beamonte raphael.beamo...@polymtl.ca wrote:
On 2013-04-02 16:45, Simon Marchi wrote:
--subbuf-size accepts sizes such as:
- 123 - 123
- 123k or 123K - 123 * 1024
- 123m or 123M - 123 * 1024 * 1024
- 123g or 123G - 123 * 1024 * 1024 * 1024
I don't really like