In preparation for showing kvm__get_dir() path to the user, kill the
unnecessary double slash to make the output more readable.

Cc: Asias He <[email protected]>
Cc: Cyrill Gorcunov <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Sasha Levin <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
---
 tools/kvm/kvm.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c
index 8d6b5e1..8605fc8 100644
--- a/tools/kvm/kvm.c
+++ b/tools/kvm/kvm.c
@@ -86,7 +86,11 @@ static char kvm_dir[PATH_MAX];
 
 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);
+
+       realpath(tmp, kvm_dir);
 }
 
 void kvm__set_dir(const char *fmt, ...)
-- 
1.7.6.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to