From 3ef16c3030b956603b3a99ae76f735a94b41a60d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20H=C3=BCck?= Date: Wed, 24 Jan 2018 19:26:53 +0100 Subject: [PATCH] initialize path variable correctly --- src/mdtest.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mdtest.c b/src/mdtest.c index 95777fd..aadbf78 100644 --- a/src/mdtest.c +++ b/src/mdtest.c @@ -1655,6 +1655,10 @@ void show_file_system_size(char *file_system) { used_inode_percentage = (1 - ((double)free_inodes/(double)total_inodes)) * 100; + if (realpath(file_system, real_path) == NULL) { + FAIL("unable to use realpath()"); + } + /* show results */ fprintf(stdout, "Path: %s\n", real_path); fprintf(stdout, "FS: %.1f %s Used FS: %2.1f%% ",