From 16c360ee911b51b5c64bd25d48110a236ccc69fc Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 7 Nov 2012 23:14:01 +0000 Subject: Remove commented-out method copied from BackupStoreInfo and not used. --- lib/backupstore/BackupStoreRefCountDatabase.cpp | 83 ------------------------- 1 file changed, 83 deletions(-) (limited to 'lib/backupstore/BackupStoreRefCountDatabase.cpp') 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 @@ -159,89 +159,6 @@ std::auto_ptr BackupStoreRefCountDatabase::Load( return refcount; } -// -------------------------------------------------------------------------- -// -// 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::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 -- cgit v1.2.3