lttng: clean-up the printout of snapshot outputs
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 27 Mar 2019 17:36:06 +0000 (13:36 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 29 Mar 2019 15:47:56 +0000 (11:47 -0400)
commit4a5eb2607ecc653044e90c1398351373afbc5003
tree24f4b89d401c111f9cfd66c89dd636df1d495123
parent28a20cd344bf8a6ca866d8faa6b325c7c97289bc
lttng: clean-up the printout of snapshot outputs

The printout of snapshot outputs, when they are added or listed,
insistently uses "-1" and "0" to indicate that no "max-size"
parameter is specified.

This commit only prints the "max-size" settings when one is
actually specified and changes the spelling of "max-size" to
"max size".

Moreover, the unit (bytes) is printed when a max-size parameter
is specified on a snapshot output.

This changes the output of the listing of snapshot outputs as follows.

Before:
$ lttng snapshot list-output
Snapshot output list for session auto-20190327-133932
    [1] snapshot-1: /home/jgalar/lttng-traces/auto-20190327-133932 (max-size: 0)

After:
$ lttng snapshot list-output
Snapshot output list for session auto-20190327-133932
    [1] snapshot-1: /home/jgalar/lttng-traces/auto-20190327-133932

Creating a snapshot output without a max-size no longer indicates
"(max-size: -1)".

Before:
$ lttng snapshot add-output /tmp/keb
Snapshot output successfully added for session auto-20190327-134055
  [1] snapshot-1: /tmp/keb (max-size: -1)

After:
$ lttng snapshot add-output /tmp/keb
Snapshot output successfully added for session auto-20190327-134055
  [1] snapshot-1: /tmp/keb

Max sizes, when specified, are printed in bytes.

Before:
$ lttng snapshot add-output /tmp/keb --max-size=498394
Snapshot output successfully added for session auto-20190327-134055
  [1] snapshot-1: /tmp/keb (max-size: 498394)

After:
$ lttng snapshot add-output /tmp/keb --max-size=498394
Snapshot output successfully added for session auto-20190327-134055
  [1] snapshot-1: /tmp/keb (max size: 498394 bytes)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/snapshot.c
This page took 0.026705 seconds and 4 git commands to generate.