Put updated copyright statements in all source files.
[cumulus.git] / scandir.cc
index 1daf352..8360763 100644 (file)
@@ -1,4 +1,25 @@
-/* Recursively descend the filesystem and visit each file. */
+/* Cumulus: Smart Filesystem Backup to Dumb Servers
+ *
+ * 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>
@@ -782,7 +803,8 @@ int main(int argc, char *argv[])
     if (backup_scheme.size() > 0)
         checksum_filename += backup_scheme + "-";
     checksum_filename = checksum_filename + desc_buf + "." + csum_type + "sums";
-    RemoteFile *checksum_file = remote->alloc_file(checksum_filename);
+    RemoteFile *checksum_file = remote->alloc_file(checksum_filename,
+                                                   "checksums");
     FILE *checksums = fdopen(checksum_file->get_fd(), "w");
 
     for (std::set<string>::iterator i = segment_list.begin();
@@ -824,7 +846,8 @@ int main(int argc, char *argv[])
         desc_filename += backup_scheme + "-";
     desc_filename = desc_filename + desc_buf + ".lbs";
 
-    RemoteFile *descriptor_file = remote->alloc_file(desc_filename);
+    RemoteFile *descriptor_file = remote->alloc_file(desc_filename,
+                                                     "snapshots");
     int descriptor_fd = descriptor_file->get_fd();
     if (descriptor_fd < 0) {
         fprintf(stderr, "Unable to open descriptor output file: %m\n");