]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/tools/bregex.c
ebl Fix warning on 64bit
[bacula/bacula] / bacula / src / tools / bregex.c
index bb5c49c415ccf6cc147b56b3415db787b283d050..c709b87dc3811404a5906597049b764e61c32ff2 100644 (file)
@@ -65,6 +65,8 @@ static void usage()
 "       -f          specify file of data to be matched\n"
 "       -l          suppress line numbers\n"
 "       -n          print lines that do not match\n"
+"       -d <nn>     set debug level to <nn>\n"
+"       -dt         print timestamp in debug output\n"
 "       -?          print this message.\n"
 "\n\n");
 
@@ -93,9 +95,13 @@ int main(int argc, char *const *argv)
    while ((ch = getopt(argc, argv, "d:f:n?")) != -1) {
       switch (ch) {
       case 'd':                       /* set debug level */
-         debug_level = atoi(optarg);
-         if (debug_level <= 0) {
-            debug_level = 1;
+         if (*optarg == 't') {
+            dbg_timestamp = true;
+         } else {
+            debug_level = atoi(optarg);
+            if (debug_level <= 0) {
+               debug_level = 1;
+            }
          }
          break;