In preparation for showing kvm__get_dir() path to the user, kill the
unnecessary double slash to make the output more readable.
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Sasha Levin <levinsasha928@gmail.com>
Cc: Asias He <asias.hejun@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
static void set_dir(const char *fmt, va_list args)
{
- vsnprintf(kvm_dir, sizeof(kvm_dir), fmt, args);
+ char tmp[PATH_MAX];
+
+ vsnprintf(tmp, sizeof(tmp), fmt, args);
+
+ if (!realpath(tmp, kvm_dir))
+ die("Unable to set KVM tool directory");
}
void kvm__set_dir(const char *fmt, ...)