salvager-fast-restart-log-to-syslog-also-20030111
authorNathan Neulinger <nneul@umr.edu>
Sun, 12 Jan 2003 02:02:48 +0000 (02:02 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 12 Jan 2003 02:02:48 +0000 (02:02 +0000)
if -syslog, also log this to syslog

src/vol/vol-salvage.c

index ba4cafe..beee013 100644 (file)
@@ -496,7 +496,13 @@ static handleit(as)
         }
     }
     if (!seenany) {
-      printf("Exiting immediately without salvage. Look into the FileLog to find volumes which really need to be salvaged!\n");
+       char *msg = "Exiting immediately without salvage. Look into the FileLog to find volumes which really need to be salvaged!";
+
+       if ( useSyslog )
+         Log(msg);
+        else
+          printf("%s\n", msg);
+
       Exit(0);
     }
 #endif /* FAST_RESTART */
@@ -588,8 +594,12 @@ static handleit(as)
 
 #ifdef FAST_RESTART
     if (ti = as->parms[18].items) {  /* -DontSalvage */
-      printf("Exiting immediately without salvage. Look into the FileLog");
-      printf(" to find volumes which really need to be salvaged!\n");
+       char *msg = "Exiting immediately without salvage. Look into the FileLog to find volumes which really need to be salvaged!";
+
+       if ( useSyslog )
+         Log(msg);
+        else
+          printf("%s\n", msg);
       Exit(0);
     }
 #endif /* FAST_RESTART */