]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Modify error messages on console input/output 2330/head
authorsenhuang42 <senhuang96@fb.com>
Mon, 28 Sep 2020 16:15:18 +0000 (12:15 -0400)
committersenhuang42 <senhuang96@fb.com>
Mon, 28 Sep 2020 16:15:18 +0000 (12:15 -0400)
programs/zstdcli.c

index 5d1c09de68db06177d631dc6b66dbfcdd002572e..8df9a646439c95e937faed6c6afe3cd73777b2f5 100644 (file)
@@ -1243,7 +1243,7 @@ int main(int const argCount, const char* argv[])
 
     /* Check if input/output defined as console; trigger an error in this case */
     if (!strcmp(filenames->fileNames[0], stdinmark) && IS_CONSOLE(stdin) ) {
-        badusage(programName);
+        DISPLAYLEVEL(1, "stdin is a console, aborting\n");
         CLEAN_RETURN(1);
     }
     if ( outFileName && !strcmp(outFileName, stdoutmark)
@@ -1251,7 +1251,7 @@ int main(int const argCount, const char* argv[])
       && !strcmp(filenames->fileNames[0], stdinmark)
       && !forceStdout
       && operation!=zom_decompress ) {
-        badusage(programName);
+        DISPLAYLEVEL(1, "stdout is a console, aborting\n");
         CLEAN_RETURN(1);
     }