Fix: error out on leftover arguments
All the commands currently ignore leftover arguments, this can lead to
wrong usage of the commands and waste of time debugging. For example,
this command enables the vpid context on all channels instead of only on
the "mychan" channel:
$ lttng add-context -u mychan -t vpid
The correct usage is:
$ lttng add-context -u -c mychan -t vpid
We now output an error on leftover arguments:
$ lttng add-context -u mychan -t vpid
Error: Unknown argument: mychan
Error: Command error
Some commands accept one leftover argument (create, start, stop,
destroy), so we check if there are other leftovers:
$ lttng create mysess allo
Error: Unknown argument: allo
Error: Command error
Only the snapshot command is not handled since it has a second level of
command and does not consume the popt arguments.
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
13 files changed:
This page took 0.027117 seconds and 4 git commands to generate.