Remove some debugging output so backup runs are less verbose.
[cumulus.git] / scandir.cc
index 357ae63..a005d41 100644 (file)
@@ -1,10 +1,26 @@
-/* LBS: An LFS-inspired filesystem backup system
- * Copyright (C) 2006-2008  Michael Vrable
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
  *
- * Main entry point for LBS.  Contains logic for traversing the filesystem and
- * constructing a backup.
+ * Copyright (C) 2006-2008  The Regents of the University of California
+ * Written by Michael Vrable <mvrable@cs.ucsd.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+/* Main entry point for LBS.  Contains logic for traversing the filesystem and
+ * constructing a backup. */
+
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -399,7 +415,6 @@ void scanfile(const string& path, bool include)
     for (list<string>::iterator i = includes.begin();
          i != includes.end(); ++i) {
         if (path == *i) {
-            printf("Including %s\n", path.c_str());
             include = true;
         }
     }
@@ -407,7 +422,6 @@ void scanfile(const string& path, bool include)
     for (list<string>::iterator i = excludes.begin();
          i != excludes.end(); ++i) {
         if (path == *i) {
-            printf("Excluding %s\n", path.c_str());
             include = false;
         }
     }
@@ -415,7 +429,6 @@ void scanfile(const string& path, bool include)
     for (list<string>::iterator i = searches.begin();
          i != searches.end(); ++i) {
         if (path == *i) {
-            printf("Scanning %s\n", path.c_str());
             scan_only = true;
         }
     }
@@ -516,7 +529,6 @@ void scanfile(const string& path, bool include)
  * themselves are excluded from being backed up. */
 void add_include(const char *path)
 {
-    printf("Add: %s\n", path);
     /* Was an absolute path specified?  If so, we'll need to start scanning
      * from the root directory.  Make sure that the user was consistent in
      * providing either all relative paths or all absolute paths. */
@@ -701,28 +713,6 @@ int main(int argc, char *argv[])
         return 1;
     }
 
-    // Dump paths for debugging/informational purposes
-    {
-        list<string>::const_iterator i;
-
-        printf("LBS Version: %s\n", lbs_version);
-
-        printf("--dest=%s\n--localdb=%s\n--upload-script=%s\n",
-               backup_dest.c_str(), localdb_dir.c_str(), backup_script.c_str());
-
-        printf("Includes:\n");
-        for (i = includes.begin(); i != includes.end(); ++i)
-            printf("    %s\n", i->c_str());
-
-        printf("Excludes:\n");
-        for (i = excludes.begin(); i != excludes.end(); ++i)
-            printf("    %s\n", i->c_str());
-
-        printf("Searching:\n");
-        for (i = searches.begin(); i != searches.end(); ++i)
-            printf("    %s\n", i->c_str());
-    }
-
     block_buf = new char[LBS_BLOCK_SIZE];
 
     /* Initialize the remote storage layer.  If using an upload script, create