aboutsummaryrefslogtreecommitdiffstats
path: root/kvm.c
diff options
context:
space:
mode:
authorPekka Enberg <penberg@kernel.org>2011-10-26 17:12:51 +0300
committerWill Deacon <will.deacon@arm.com>2015-06-01 16:39:48 +0100
commitf76a328537d792429da73e0e75d0a8a21432a2d9 (patch)
treed17c892f2b678a1ab362c0bde327124febb29288 /kvm.c
parent2bc995fbc0ba33821527d78b51746c24ccd79e44 (diff)
downloadkvmtool-f76a328537d792429da73e0e75d0a8a21432a2d9.tar.gz
kvm tools: Fix kvm__set_dir() to include trailing slash
All of our code expects kvm__get_dir() to return a path with a trailing slash. This fixes "kvm run" and "kvm setup" making directories such as "$HOME/.kvmtoolsdefault" for guest rootfs. Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'kvm.c')
-rw-r--r--kvm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kvm.c b/kvm.c
index c9297577..d953b945 100644
--- a/kvm.c
+++ b/kvm.c
@@ -94,6 +94,8 @@ static void set_dir(const char *fmt, va_list args)
if (!realpath(tmp, kvm_dir))
die("Unable to set KVM tool directory");
+
+ strcat(kvm_dir, "/");
}
void kvm__set_dir(const char *fmt, ...)