From 850b731e4db2aafc9a6015205689da558785617d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 16 Sep 2002 15:13:54 +0000 Subject: [PATCH] Some small cleanups. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1059 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/Journal.h | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/Journal.h b/src/add-ons/kernel/file_systems/bfs/Journal.h index f9195d780e..1370932aa2 100644 --- a/src/add-ons/kernel/file_systems/bfs/Journal.h +++ b/src/add-ons/kernel/file_systems/bfs/Journal.h @@ -44,14 +44,14 @@ class Journal { status_t InitCheck(); status_t Lock(Transaction *owner); - void Unlock(Transaction *owner,bool success); + void Unlock(Transaction *owner, bool success); status_t CheckLogEntry(int32 count, off_t *array); status_t ReplayLogEntry(int32 *start); status_t ReplayLog(); status_t WriteLogEntry(); - status_t LogBlocks(off_t blockNumber,const uint8 *buffer, size_t numBlocks); + status_t LogBlocks(off_t blockNumber, const uint8 *buffer, size_t numBlocks); thread_id CurrentThread() const { return fOwningThread; } Transaction *CurrentTransaction() const { return fOwner; } @@ -98,18 +98,18 @@ Journal::FreeLogBlocks() const class Transaction { public: - Transaction(Volume *volume,off_t refBlock) + Transaction(Volume *volume, off_t refBlock) : fJournal(NULL) { - Start(volume,refBlock); + Start(volume, refBlock); } - Transaction(Volume *volume,block_run refRun) + Transaction(Volume *volume, block_run refRun) : fJournal(NULL) { - Start(volume,volume->ToBlock(refRun)); + Start(volume, volume->ToBlock(refRun)); } Transaction() @@ -121,26 +121,24 @@ class Transaction { ~Transaction() { if (fJournal) - fJournal->Unlock(this,false); + fJournal->Unlock(this, false); } - status_t Start(Volume *volume,off_t refBlock); + status_t Start(Volume *volume, off_t refBlock); void Done() { if (fJournal != NULL) - fJournal->Unlock(this,true); + fJournal->Unlock(this, true); fJournal = NULL; } - status_t WriteBlocks(off_t blockNumber,const uint8 *buffer,size_t numBlocks = 1) + status_t WriteBlocks(off_t blockNumber, const uint8 *buffer, size_t numBlocks = 1) { if (fJournal == NULL) return B_NO_INIT; - return fJournal->LogBlocks(blockNumber,buffer,numBlocks); - //status_t status = cached_write/*_locked*/(fVolume->Device(),blockNumber,buffer,numBlocks,fVolume->BlockSize()); - //return status; + return fJournal->LogBlocks(blockNumber, buffer, numBlocks); } Volume *GetVolume() { return fJournal != NULL ? fJournal->GetVolume() : NULL; }