--no-content-size cli

This commit is contained in:
Bimba Shrestha
2020-03-09 13:07:29 -05:00
parent bc0e10ae78
commit 167244a64f
3 changed files with 12 additions and 2 deletions
+7 -1
View File
@@ -323,6 +323,7 @@ struct FIO_prefs_s {
int excludeCompressedFiles;
int patchFromMode;
int noContentSize;
};
@@ -494,6 +495,11 @@ void FIO_setPatchFromMode(FIO_prefs_t* const prefs, int value)
prefs->patchFromMode = value != 0;
}
void FIO_setNoContentSize(FIO_prefs_t* const prefs, int value)
{
prefs->noContentSize = value != 0;
}
/*-*************************************
* Functions
***************************************/
@@ -1336,7 +1342,7 @@ FIO_compressFilename_internal(FIO_prefs_t* const prefs,
clock_t const cpuStart = clock();
U64 readsize = 0;
U64 compressedfilesize = 0;
U64 const fileSize = UTIL_getFileSize(srcFileName);
U64 const fileSize = !prefs->noContentSize ? UTIL_getFileSize(srcFileName) : UTIL_FILESIZE_UNKNOWN;
DISPLAYLEVEL(5, "%s: %u bytes \n", srcFileName, (unsigned)fileSize);
/* compression format selection */