aboutsummaryrefslogtreecommitdiffstats
path: root/builtin-balloon.c
diff options
context:
space:
mode:
authorSasha Levin <levinsasha928@gmail.com>2011-08-12 18:20:55 +0300
committerWill Deacon <will.deacon@arm.com>2015-06-01 16:39:47 +0100
commit0725673ad39930be912cfcb0600eb4d5f9188b14 (patch)
tree63280afab5e47cce6fee6c3b4ce18b9f6f1ddbe9 /builtin-balloon.c
parent9abc695d9116baae92a62757d85b1262d76bdf15 (diff)
downloadkvmtool-0725673ad39930be912cfcb0600eb4d5f9188b14.tar.gz
kvm tools: Connect existing command helpers to 'kvm help'
This patch connects usage helpers to 'kvm help' callbacks, allowing to see help about a command by doing 'kvm help [command]'. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'builtin-balloon.c')
-rw-r--r--builtin-balloon.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/builtin-balloon.c b/builtin-balloon.c
index 907a56a7..08795cd5 100644
--- a/builtin-balloon.c
+++ b/builtin-balloon.c
@@ -17,6 +17,11 @@ static const struct option balloon_options[] = {
OPT_END()
};
+void kvm_balloon_help(void)
+{
+ usage_with_options(balloon_usage, balloon_options);
+}
+
int kvm_cmd_balloon(int argc, const char **argv, const char *prefix)
{
int pid;
@@ -24,7 +29,7 @@ int kvm_cmd_balloon(int argc, const char **argv, const char *prefix)
int inflate = 0;
if (argc != 3)
- usage_with_options(balloon_usage, balloon_options);
+ kvm_balloon_help();
pid = kvm__get_pid_by_instance(argv[2]);
if (pid < 0)