vzctl snapshot-list: fix processing first option

First option to snapshot-list were ignored, because getopt_long() starts
processing options from argv[1], assuming argv[0] is binary name.

To fix, do not increment argv (and decrement argc) when calling
run_action(); instead, do this inside run_action when needed.
This way if we would add something that uses getopt() we'd be fine.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2 files changed