Skip to content
This repository was archived by the owner on Feb 24, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/utilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ IOR_offset_t StringToBytes(char *size_str)
void ShowFileSystemSize(char *fileSystem)
{
#ifndef _WIN32 /* FIXME */
char realPath[PATH_MAX];
char *realPath;
char *fileSystemUnitStr;
long long int totalFileSystemSize;
long long int freeFileSystemSize;
Expand Down Expand Up @@ -352,7 +352,8 @@ void ShowFileSystemSize(char *fileSystem)
(1 - ((double)freeInodes / (double)totalInodes)) * 100;

/* show results */
if (realpath(fileSystem, realPath) == NULL) {
realPath = realpath(fileSystem, NULL);
if (realPath == NULL) {
ERR("unable to use realpath()");
}
fprintf(stdout, "Path: %s\n", realPath);
Expand Down