initialize path variable correctly

master
Alexander Hück 2018-01-24 19:26:53 +01:00
parent e6e0527d72
commit 3ef16c3030
1 changed files with 4 additions and 0 deletions

View File

@ -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%% ",