Merge pull request #29 from ahueck/fix_realpath

initialize path variable correctly
master
Glenn K. Lockwood 2018-01-24 10:51:09 -08:00 committed by GitHub
commit 0e7f48d649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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%% ",