diff --git a/headers/private/storage/DiskDeviceRoster.h b/headers/private/storage/DiskDeviceRoster.h index b7d78df6bd..713b745879 100644 --- a/headers/private/storage/DiskDeviceRoster.h +++ b/headers/private/storage/DiskDeviceRoster.h @@ -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, diff --git a/src/kits/storage/disk_device/DiskDeviceRoster.cpp b/src/kits/storage/disk_device/DiskDeviceRoster.cpp index c7b219fe70..9c0e6697a2 100644 --- a/src/kits/storage/disk_device/DiskDeviceRoster.cpp +++ b/src/kits/storage/disk_device/DiskDeviceRoster.cpp @@ -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;