Commit-ID: aa26f59f5794515fb42d54749b4cd180a665d95e Gitweb: http://git.kernel.org/tip/aa26f59f5794515fb42d54749b4cd180a665d95e Author: Asias He <asias.hejun@xxxxxxxxx> AuthorDate: Sun, 7 Aug 2011 14:57:15 +0800 Committer: Pekka Enberg <penberg@xxxxxxxxxx> CommitDate: Sun, 7 Aug 2011 21:59:31 +0300 kvm tools: Tune 'kvm balloon' option This patch changes the option from: kvm balloon [command] [instance name] [amount] to: kvm balloon [inflate/deflate] [size in MiB] [instance name] Acked-by: Sasha Levin <levinsasha928@xxxxxxxxx> Signed-off-by: Asias He <asias.hejun@xxxxxxxxx> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx> --- tools/kvm/Documentation/kvm-balloon.txt | 2 +- tools/kvm/builtin-balloon.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/kvm/Documentation/kvm-balloon.txt b/tools/kvm/Documentation/kvm-balloon.txt index 5ba68d6..a29a201 100644 --- a/tools/kvm/Documentation/kvm-balloon.txt +++ b/tools/kvm/Documentation/kvm-balloon.txt @@ -8,7 +8,7 @@ kvm-balloon - Inflate or deflate the virtio balloon SYNOPSIS -------- [verse] -'kvm balloon [instance] [command] [size]' +'kvm balloon [command] [size] [instance]' DESCRIPTION ----------- diff --git a/tools/kvm/builtin-balloon.c b/tools/kvm/builtin-balloon.c index 319941d..ce076ba 100644 --- a/tools/kvm/builtin-balloon.c +++ b/tools/kvm/builtin-balloon.c @@ -14,9 +14,9 @@ int kvm_cmd_balloon(int argc, const char **argv, const char *prefix) int inflate = 0; if (argc != 3) - die("Usage: kvm balloon [command] [instance name] [amount]\n"); + die("Usage: kvm balloon [inflate/deflate] [size in MiB] [instance name]\n"); - pid = kvm__get_pid_by_instance(argv[1]); + pid = kvm__get_pid_by_instance(argv[2]); if (pid < 0) die("Failed locating instance name"); @@ -25,7 +25,7 @@ int kvm_cmd_balloon(int argc, const char **argv, const char *prefix) else if (strcmp(argv[0], "deflate")) die("command can be either 'inflate' or 'deflate'"); - amount = atoi(argv[2]); + amount = atoi(argv[1]); for (i = 0; i < amount; i++) kill(pid, inflate ? SIGKVMADDMEM : SIGKVMDELMEM); -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |