From 8482590d4b4c8158ba05815c8f62c74a4d5a591f Mon Sep 17 00:00:00 2001
From: Carl Baldwin <cnb@ball.(none)>
Date: Sat, 22 Oct 2005 20:32:42 -0600
Subject: [PATCH] Change persistant db name

---
 main.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/main.cpp b/main.cpp
index d00d8de..945cc0d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -10,6 +10,7 @@
 using namespace std;
 
 static const unsigned int bytes_in_block = 0x800;
+static const char * dbname = "/var/tmp/backups.db";
 
 unsigned long long current_time() {
   unsigned long long rc = 0;
@@ -114,7 +115,7 @@ int main() {
   populate_set( cin, current );
 
   file_set backed_up;
-  ifstream db( "test.db" );
+  ifstream db( dbname );
   if( db && db.good() ) {
     populate_set( db, backed_up );
   }
@@ -157,7 +158,7 @@ int main() {
   sort( backups_s.begin(), backups_s.end(), sizecmp );
 
   file_set final;
-  unsigned long long space = 0x102800000ULL;  // about 98% of 4220 MBytes
+  unsigned long long space = 0x100000000ULL; // After looking at how big the ISO can be and how many 1K blocks are left after formatting the filesystem I decided on an even 4GB target
 
   insert_iterator<file_set> final_i( final, final.begin() );
 
@@ -196,7 +197,7 @@ int main() {
   }
 
   // Write the 'current' list to the dbfile
-  ofstream dbout( "test.db" );
+  ofstream dbout( dbname );
   copy( current.begin(), current.end(), ostream_iterator<FileData*>( dbout, "" ) );
 
   // Write the 'final' list to stdout
-- 
2.34.1