lttng cli: Accept human readable sizes for --subbuf-size
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 12 Apr 2013 21:15:12 +0000 (17:15 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 2 May 2013 15:23:15 +0000 (11:23 -0400)
commit70d0b120691e90d81de7b38af8b845e261b5b40c
tree7e9d06f00cc09f7fce0fb41ab40b03d2589095dc
parent9a3633697faff9b12a64b6d727444eb370fd2340
lttng cli: Accept human readable sizes for --subbuf-size

--subbuf-size accepts sizes such as:

- 123 -> 123
- 123k -> 123 * 1024
- 123M -> 123 * 1024^2
- 123G -> 123 * 1024^3

It uses the new parse_size_suffix function, which could probably be used
at other places, such as tracefile size.

Unit tests are included.

Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
.gitignore
doc/man/lttng.1
src/bin/lttng/commands/enable_channels.c
src/common/utils.c
src/common/utils.h
tests/unit/Makefile.am
tests/unit/test_utils_parse_size_suffix.c [new file with mode: 0644]
This page took 0.0293679999999999 seconds and 4 git commands to generate.