]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Unknown Suffix Error
authorGeorge Lu <gclu@fb.com>
Thu, 31 May 2018 23:13:36 +0000 (16:13 -0700)
committerGeorge Lu <gclu@fb.com>
Thu, 31 May 2018 23:13:36 +0000 (16:13 -0700)
Changed so only compiled formats are printed in list of supported extensions

programs/fileio.c

index d5b389e1eaf864e93d7d5566eef46d96180f91b1..a1da4bc3b40f1f30d0aaf5b2f6fef8d154feb6fe 100644 (file)
@@ -1754,8 +1754,18 @@ int FIO_decompressMultipleFilenames(const char** srcNamesTable, unsigned nbFiles
                     && strcmp(suffixPtr, ZSTD_EXTENSION)
                     && strcmp(suffixPtr, LZMA_EXTENSION)
                     && strcmp(suffixPtr, LZ4_EXTENSION)) ) {
-                DISPLAYLEVEL(1, "zstd: %s: unknown suffix (%s/%s/%s/%s/%s expected) -- ignored \n",
-                             srcFileName, GZ_EXTENSION, XZ_EXTENSION, ZSTD_EXTENSION, LZMA_EXTENSION, LZ4_EXTENSION);
+                char suffixlist[50] = ZSTD_EXTENSION;
+                #ifdef ZSTD_GZCOMPRESS
+                    strcat(suffixlist, "/" GZ_EXTENSION);
+                #endif
+                #ifdef ZSTD_LZMACOMPRESS
+                    strcat(suffixlist, "/" XZ_EXTENSION "/" LZMA_EXTENSION);
+                #endif
+                #ifdef ZSTD_LZ4COMPRESS
+                    strcat(suffixlist, "/" LZ4_EXTENSION);
+                #endif
+                DISPLAYLEVEL(1, "zstd: %s: unknown suffix (%s expected) -- ignored \n",
+                             srcFileName, suffixlist);
                 skippedFiles++;
                 continue;
             } else {