Make it clear from the API that the volume passed in is not touched by the

function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30326 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-04-22 14:13:45 +00:00
parent 97f89e0360
commit acc632c7ec
2 changed files with 5 additions and 5 deletions

View File

@ -116,7 +116,7 @@ public:
BDiskDevice* device = NULL,
BPartition** _partition = NULL);
status_t FindPartitionByVolume(BVolume* volume,
status_t FindPartitionByVolume(const BVolume& volume,
BDiskDevice* device,
BPartition** _partition);
status_t FindPartitionByMountPoint(const char* mountPoint,

View File

@ -327,8 +327,8 @@ BDiskDeviceRoster::VisitEachMountablePartition(BDiskDeviceVisitor* visitor,
/*! \brief Finds a BPartition by BVolume.
*/
status_t
BDiskDeviceRoster::FindPartitionByVolume(BVolume* volume, BDiskDevice* device,
BPartition** _partition)
BDiskDeviceRoster::FindPartitionByVolume(const BVolume& volume,
BDiskDevice* device, BPartition** _partition)
{
class FindPartitionVisitor : public BDiskDeviceVisitor {
public:
@ -352,7 +352,7 @@ BDiskDeviceRoster::FindPartitionByVolume(BVolume* volume, BDiskDevice* device,
private:
dev_t fVolume;
} visitor(volume->Device());
} visitor(volume.Device());
if (VisitEachMountedPartition(&visitor, device, _partition))
return B_OK;
@ -369,7 +369,7 @@ BDiskDeviceRoster::FindPartitionByMountPoint(const char* mountPoint,
{
BVolume volume(dev_for_path(mountPoint));
if (volume.InitCheck() == B_OK
&& FindPartitionByVolume(&volume, device, _partition))
&& FindPartitionByVolume(volume, device, _partition))
return B_OK;
return B_ENTRY_NOT_FOUND;