* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33549 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b74a098352
commit
8e13fac960
@ -6,30 +6,33 @@
|
||||
* Tomas Kucera, kucerat@centrum.cz
|
||||
*/
|
||||
|
||||
|
||||
#include "PartitionLocker.h"
|
||||
|
||||
|
||||
// #pragma mark - PartitionLocker
|
||||
|
||||
// constructor
|
||||
|
||||
PartitionLocker::PartitionLocker(partition_id partitionID)
|
||||
: fDevice(NULL),
|
||||
fPartitionID(partitionID)
|
||||
:
|
||||
fDevice(NULL),
|
||||
fPartitionID(partitionID)
|
||||
{
|
||||
}
|
||||
|
||||
// destructor
|
||||
|
||||
PartitionLocker::~PartitionLocker()
|
||||
{
|
||||
}
|
||||
|
||||
// IsLocked
|
||||
|
||||
bool
|
||||
PartitionLocker::IsLocked() const
|
||||
{
|
||||
return fDevice;
|
||||
return fDevice != NULL;
|
||||
}
|
||||
|
||||
// PartitionId
|
||||
|
||||
partition_id
|
||||
PartitionLocker::PartitionId() const
|
||||
{
|
||||
@ -40,14 +43,14 @@ PartitionLocker::PartitionId() const
|
||||
// #pragma mark - PartitionReadLocker
|
||||
|
||||
|
||||
// constructor
|
||||
PartitionReadLocker::PartitionReadLocker(partition_id partitionID)
|
||||
: PartitionLocker(partitionID)
|
||||
:
|
||||
PartitionLocker(partitionID)
|
||||
{
|
||||
fDevice = read_lock_disk_device(partitionID);
|
||||
}
|
||||
|
||||
// destructor
|
||||
|
||||
PartitionReadLocker::~PartitionReadLocker()
|
||||
{
|
||||
if (IsLocked())
|
||||
@ -58,14 +61,14 @@ PartitionReadLocker::~PartitionReadLocker()
|
||||
// #pragma mark - PartitionWriteLocker
|
||||
|
||||
|
||||
// constructor
|
||||
PartitionWriteLocker::PartitionWriteLocker(partition_id partitionID)
|
||||
: PartitionLocker(partitionID)
|
||||
:
|
||||
PartitionLocker(partitionID)
|
||||
{
|
||||
fDevice = write_lock_disk_device(partitionID);
|
||||
}
|
||||
|
||||
// destructor
|
||||
|
||||
PartitionWriteLocker::~PartitionWriteLocker()
|
||||
{
|
||||
if (IsLocked())
|
||||
|
@ -6,11 +6,13 @@
|
||||
* Tomas Kucera, kucerat@centrum.cz
|
||||
*/
|
||||
|
||||
|
||||
#include "PartitionLocker.h"
|
||||
|
||||
|
||||
// #pragma mark - PartitionLocker
|
||||
|
||||
// constructor
|
||||
|
||||
PartitionLocker::PartitionLocker(partition_id partitionID)
|
||||
:
|
||||
fDevice(NULL),
|
||||
@ -18,19 +20,19 @@ PartitionLocker::PartitionLocker(partition_id partitionID)
|
||||
{
|
||||
}
|
||||
|
||||
// destructor
|
||||
|
||||
PartitionLocker::~PartitionLocker()
|
||||
{
|
||||
}
|
||||
|
||||
// IsLocked
|
||||
|
||||
bool
|
||||
PartitionLocker::IsLocked() const
|
||||
{
|
||||
return fDevice;
|
||||
return fDevice != NULL;
|
||||
}
|
||||
|
||||
// PartitionId
|
||||
|
||||
partition_id
|
||||
PartitionLocker::PartitionId() const
|
||||
{
|
||||
@ -41,7 +43,6 @@ PartitionLocker::PartitionId() const
|
||||
// #pragma mark - PartitionReadLocker
|
||||
|
||||
|
||||
// constructor
|
||||
PartitionReadLocker::PartitionReadLocker(partition_id partitionID)
|
||||
:
|
||||
PartitionLocker(partitionID)
|
||||
@ -49,7 +50,7 @@ PartitionReadLocker::PartitionReadLocker(partition_id partitionID)
|
||||
fDevice = read_lock_disk_device(partitionID);
|
||||
}
|
||||
|
||||
// destructor
|
||||
|
||||
PartitionReadLocker::~PartitionReadLocker()
|
||||
{
|
||||
if (IsLocked())
|
||||
@ -60,7 +61,6 @@ PartitionReadLocker::~PartitionReadLocker()
|
||||
// #pragma mark - PartitionWriteLocker
|
||||
|
||||
|
||||
// constructor
|
||||
PartitionWriteLocker::PartitionWriteLocker(partition_id partitionID)
|
||||
:
|
||||
PartitionLocker(partitionID)
|
||||
@ -68,7 +68,7 @@ PartitionWriteLocker::PartitionWriteLocker(partition_id partitionID)
|
||||
fDevice = write_lock_disk_device(partitionID);
|
||||
}
|
||||
|
||||
// destructor
|
||||
|
||||
PartitionWriteLocker::~PartitionWriteLocker()
|
||||
{
|
||||
if (IsLocked())
|
||||
|
Loading…
Reference in New Issue
Block a user