aboutsummaryrefslogtreecommitdiffstats
path: root/builtin-balloon.c
diff options
context:
space:
mode:
authorSasha Levin <levinsasha928@gmail.com>2011-08-15 17:33:00 +0300
committerWill Deacon <will.deacon@arm.com>2015-06-01 16:39:47 +0100
commit66ce4f5eecfcaa794edc62a1ec3486b9bec6256d (patch)
tree4726ca5683abc88209e3ac9399ffa550db4886e2 /builtin-balloon.c
parentbc10d2c1c84c6acf57292013fb1fd9e2cfe3ee51 (diff)
downloadkvmtool-66ce4f5eecfcaa794edc62a1ec3486b9bec6256d.tar.gz
kvm tools: Use correct data type for pid
This patch fixes an error where pids used u64 instead of pid_t, causing them to never be negative. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-balloon.c b/builtin-balloon.c
index cb7d552f..73290635 100644
--- a/builtin-balloon.c
+++ b/builtin-balloon.c
@@ -8,7 +8,7 @@
#include <kvm/parse-options.h>
#include <kvm/kvm.h>
-static u64 instance_pid;
+static pid_t instance_pid;
static const char *instance_name;
static u64 inflate;
static u64 deflate;
@@ -21,7 +21,7 @@ static const char * const balloon_usage[] = {
static const struct option balloon_options[] = {
OPT_GROUP("Instance options:"),
OPT_STRING('n', "name", &instance_name, "name", "Instance name"),
- OPT_U64('p', "pid", &instance_pid, "Instance pid"),
+ OPT_INTEGER('p', "pid", &instance_pid, "Instance pid"),
OPT_GROUP("Balloon options:"),
OPT_U64('i', "inflate", &inflate, "Amount to inflate"),
OPT_U64('d', "deflate", &deflate, "Amount to deflate"),