[PATCH v2] kvm tools: Kill double slash from kvm__get_dir()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <asias.hejun@xxxxxxxxx>
Cc: Cyrill Gorcunov <gorcunov@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Cc: Sasha Levin <levinsasha928@xxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux