]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add more descriptive message to -v option in zstd CLI 286/head
authorDavid Lam <davidlam@fb.com>
Fri, 12 Aug 2016 21:49:05 +0000 (14:49 -0700)
committerDavid Lam <davidlam@fb.com>
Sat, 13 Aug 2016 00:47:18 +0000 (17:47 -0700)
programs/zstdcli.c

index 17fba708f7332cca05267646cd7f520069c3a854..faf3bb7bade6a2475f0c4a8ac10561de646e2993 100644 (file)
@@ -92,6 +92,8 @@
 #define MB *(1 <<20)
 #define GB *(1U<<30)
 
+#define DEFAULT_DISPLAY_LEVEL 2
+
 static const char*    g_defaultDictName = "dictionary";
 static const unsigned g_defaultMaxDictSize = 110 KB;
 static const int      g_defaultDictCLevel = 5;
@@ -104,7 +106,7 @@ static const unsigned g_defaultSelectivityLevel = 9;
 #define DISPLAY(...)           fprintf(displayOut, __VA_ARGS__)
 #define DISPLAYLEVEL(l, ...)   if (displayLevel>=l) { DISPLAY(__VA_ARGS__); }
 static FILE* displayOut;
-static unsigned displayLevel = 2;   /* 0 : no display,  1: errors,  2 : + result + interaction + warnings,  3 : + progression,  4 : + information */
+static unsigned displayLevel = DEFAULT_DISPLAY_LEVEL;   /* 0 : no display,  1: errors,  2 : + result + interaction + warnings,  3 : + progression,  4 : + information */
 
 
 /*-************************************
@@ -140,7 +142,7 @@ static int usage_advanced(const char* programName)
     DISPLAY( "\n");
     DISPLAY( "Advanced arguments :\n");
     DISPLAY( " -V     : display Version number and exit\n");
-    DISPLAY( " -v     : verbose mode\n");
+    DISPLAY( " -v     : verbose mode; specify multiple times to increase log level (default:%d)\n", DEFAULT_DISPLAY_LEVEL);
     DISPLAY( " -q     : suppress warnings; specify twice to suppress errors too\n");
     DISPLAY( " -c     : force write to standard output, even if it is the console\n");
 #ifdef UTIL_HAS_CREATEFILELIST