summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2012-11-07 23:14:01 +0000
committerChris Wilson <chris+github@qwirx.com>2012-11-07 23:14:01 +0000
commit16c360ee911b51b5c64bd25d48110a236ccc69fc (patch)
tree337018bca997c60f6472ff5cf39aa2404929bfb3 /lib
parentaef5440bdf486d805895ebfe6bce565b2eab8feb (diff)
Remove commented-out method copied from BackupStoreInfo and not used.
Diffstat (limited to 'lib')
-rw-r--r--lib/backupstore/BackupStoreRefCountDatabase.cpp83
1 files changed, 0 insertions, 83 deletions
diff --git a/lib/backupstore/BackupStoreRefCountDatabase.cpp b/lib/backupstore/BackupStoreRefCountDatabase.cpp
index 4bf6f557..26f9acca 100644
--- a/lib/backupstore/BackupStoreRefCountDatabase.cpp
+++ b/lib/backupstore/BackupStoreRefCountDatabase.cpp
@@ -162,89 +162,6 @@ std::auto_ptr<BackupStoreRefCountDatabase> BackupStoreRefCountDatabase::Load(
// --------------------------------------------------------------------------
//
// Function
-// Name: BackupStoreRefCountDatabase::Save()
-// Purpose: Save modified info back to disc
-// Created: 2003/08/28
-//
-// --------------------------------------------------------------------------
-/*
-void BackupStoreRefCountDatabase::Save()
-{
- // Make sure we're initialised (although should never come to this)
- if(mFilename.empty() || mAccount.GetID() == 0)
- {
- THROW_EXCEPTION(BackupStoreException, Internal)
- }
-
- // Can we do this?
- if(mReadOnly)
- {
- THROW_EXCEPTION(BackupStoreException, StoreInfoIsReadOnly)
- }
-
- // Then... open a write file
- RaidFileWrite rf(mAccount.GetDiscSet(), mFilename);
- rf.Open(true); // allow overwriting
-
- // Make header
- info_StreamFormat hdr;
- hdr.mMagicValue = htonl(INFO_MAGIC_VALUE);
- hdr.mAccountID = htonl(mAccountID);
- hdr.mClientStoreMarker = box_hton64(mClientStoreMarker);
- hdr.mLastObjectIDUsed = box_hton64(mLastObjectIDUsed);
- hdr.mBlocksUsed = box_hton64(mBlocksUsed);
- hdr.mBlocksInOldFiles = box_hton64(mBlocksInOldFiles);
- hdr.mBlocksInDeletedFiles = box_hton64(mBlocksInDeletedFiles);
- hdr.mBlocksInDirectories = box_hton64(mBlocksInDirectories);
- hdr.mBlocksSoftLimit = box_hton64(mBlocksSoftLimit);
- hdr.mBlocksHardLimit = box_hton64(mBlocksHardLimit);
- hdr.mCurrentMarkNumber = 0;
- hdr.mOptionsPresent = 0;
- hdr.mNumberDeletedDirectories = box_hton64(mDeletedDirectories.size());
-
- // Write header
- rf.Write(&hdr, sizeof(hdr));
-
- // Write the deleted object list
- if(mDeletedDirectories.size() > 0)
- {
- int64_t objs[NUM_DELETED_DIRS_BLOCK];
-
- int tosave = mDeletedDirectories.size();
- std::vector<int64_t>::iterator i(mDeletedDirectories.begin());
- while(tosave > 0)
- {
- // How many in this one?
- int b = (tosave > NUM_DELETED_DIRS_BLOCK)?NUM_DELETED_DIRS_BLOCK:((int)(tosave));
-
- // Add them
- for(int t = 0; t < b; ++t)
- {
- ASSERT(i != mDeletedDirectories.end());
- objs[t] = box_hton64((*i));
- i++;
- }
-
- // Write
- rf.Write(objs, b * sizeof(int64_t));
-
- // Number saved
- tosave -= b;
- }
- }
-
- // Commit it to disc, converting it to RAID now
- rf.Commit(true);
-
- // Mark is as not modified
- mIsModified = false;
-}
-*/
-
-
-// --------------------------------------------------------------------------
-//
-// Function
// Name: BackupStoreRefCountDatabase::GetRefCount(int64_t
// ObjectID)
// Purpose: Get the number of references to the specified object