IOR shouldn't fail if it cannot determine file system sizes but warn. Functionality should presumably be moved into AIORI backends.

master
Julian M. Kunkel 2020-05-28 19:05:41 +01:00
parent a536649abb
commit 4b417ef1f3
2 changed files with 8 additions and 5 deletions

View File

@ -1514,7 +1514,7 @@ void show_file_system_size(char *file_system) {
* 100;
if (realpath(file_system, real_path) == NULL) {
FAIL("unable to use realpath() on file system %s", file_system);
WARN("unable to use realpath() on file system");
}

View File

@ -565,7 +565,7 @@ IOR_offset_t StringToBytes(char *size_str)
/*
* Displays size of file system and percent of data blocks and inodes used.
*/
void ShowFileSystemSize(char *fileSystem)
void ShowFileSystemSize(char *fileSystem) // this might be converted to an AIORI call
{
#ifndef _WIN32 /* FIXME */
char realPath[PATH_MAX];
@ -585,11 +585,13 @@ void ShowFileSystemSize(char *fileSystem)
#ifdef __sun
if (statvfs(fileSystem, &statusBuffer) != 0) {
ERR("unable to statvfs() file system");
WARN("unable to statvfs() file system");
return;
}
#else /* !__sun */
if (statfs(fileSystem, &statusBuffer) != 0) {
ERR("unable to statfs() file system");
WARN("unable to statfs() file system");
return;
}
#endif /* __sun */
@ -620,7 +622,8 @@ void ShowFileSystemSize(char *fileSystem)
/* show results */
if (realpath(fileSystem, realPath) == NULL) {
ERR("unable to use realpath()");
WARN("unable to use realpath()");
return;
}
if(outputFormat == OUTPUT_DEFAULT){