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:
parent
97f89e0360
commit
acc632c7ec
@ -116,7 +116,7 @@ public:
|
|||||||
BDiskDevice* device = NULL,
|
BDiskDevice* device = NULL,
|
||||||
BPartition** _partition = NULL);
|
BPartition** _partition = NULL);
|
||||||
|
|
||||||
status_t FindPartitionByVolume(BVolume* volume,
|
status_t FindPartitionByVolume(const BVolume& volume,
|
||||||
BDiskDevice* device,
|
BDiskDevice* device,
|
||||||
BPartition** _partition);
|
BPartition** _partition);
|
||||||
status_t FindPartitionByMountPoint(const char* mountPoint,
|
status_t FindPartitionByMountPoint(const char* mountPoint,
|
||||||
|
@ -327,8 +327,8 @@ BDiskDeviceRoster::VisitEachMountablePartition(BDiskDeviceVisitor* visitor,
|
|||||||
/*! \brief Finds a BPartition by BVolume.
|
/*! \brief Finds a BPartition by BVolume.
|
||||||
*/
|
*/
|
||||||
status_t
|
status_t
|
||||||
BDiskDeviceRoster::FindPartitionByVolume(BVolume* volume, BDiskDevice* device,
|
BDiskDeviceRoster::FindPartitionByVolume(const BVolume& volume,
|
||||||
BPartition** _partition)
|
BDiskDevice* device, BPartition** _partition)
|
||||||
{
|
{
|
||||||
class FindPartitionVisitor : public BDiskDeviceVisitor {
|
class FindPartitionVisitor : public BDiskDeviceVisitor {
|
||||||
public:
|
public:
|
||||||
@ -352,7 +352,7 @@ BDiskDeviceRoster::FindPartitionByVolume(BVolume* volume, BDiskDevice* device,
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
dev_t fVolume;
|
dev_t fVolume;
|
||||||
} visitor(volume->Device());
|
} visitor(volume.Device());
|
||||||
|
|
||||||
if (VisitEachMountedPartition(&visitor, device, _partition))
|
if (VisitEachMountedPartition(&visitor, device, _partition))
|
||||||
return B_OK;
|
return B_OK;
|
||||||
@ -369,7 +369,7 @@ BDiskDeviceRoster::FindPartitionByMountPoint(const char* mountPoint,
|
|||||||
{
|
{
|
||||||
BVolume volume(dev_for_path(mountPoint));
|
BVolume volume(dev_for_path(mountPoint));
|
||||||
if (volume.InitCheck() == B_OK
|
if (volume.InitCheck() == B_OK
|
||||||
&& FindPartitionByVolume(&volume, device, _partition))
|
&& FindPartitionByVolume(volume, device, _partition))
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
return B_ENTRY_NOT_FOUND;
|
return B_ENTRY_NOT_FOUND;
|
||||||
|
Loading…
Reference in New Issue
Block a user