kvm tools: Kill double slash from kvm__get_dir()
PATCH v2 1/1 kvm tools: Kill double slash from kvm__get_dir()
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(-)
tools/kvm/kvm.c +5 -1
@@ -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, ...)
Signature · 1 line
1.7.6.4