]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
use strerror(errno) to return system error message
authorYann Collet <yann.collet.73@gmail.com>
Fri, 1 Jul 2016 22:59:25 +0000 (00:59 +0200)
committerYann Collet <yann.collet.73@gmail.com>
Fri, 1 Jul 2016 22:59:25 +0000 (00:59 +0200)
programs/fileio.c

index 83d3c61f7c8e31a1cd56a56be5f452143873ae2a..7d6a406eec87e59106040fa6f6f1acf99816e57c 100644 (file)
@@ -411,7 +411,7 @@ static int FIO_compressFilename_dstFile(cRess_t ress,
     int result;
 
     ress.dstFile = FIO_openDstFile(dstFileName);
-    if (ress.dstFile==0) { DISPLAYLEVEL(1, "zstd: %s: cannot open \n", dstFileName); return 1; }
+    if (ress.dstFile==0) { DISPLAYLEVEL(1, "zstd: %s: %s \n", dstFileName, strerror(errno)); return 1; }
 
     result = FIO_compressFilename_srcFile(ress, dstFileName, srcFileName, cLevel);