From fd7f53f0492527496965dac3666cdddd92534179 Mon Sep 17 00:00:00 2001 From: Jessica Hamilton Date: Mon, 15 Sep 2014 16:28:41 +1200 Subject: [PATCH] storage kit: don't expose the dev_t in BPartition::Mount() Comments to #9672 agree that there's really no need to expose the dev_t handle, thus simplifying the API. The dev_t handle, if required, can be retrieved via BPartition::GetVolume() instead. --- headers/private/storage/Partition.h | 3 +-- src/kits/storage/disk_device/Partition.cpp | 11 +++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/headers/private/storage/Partition.h b/headers/private/storage/Partition.h index 5ef98d015d..a0e356bb4c 100644 --- a/headers/private/storage/Partition.h +++ b/headers/private/storage/Partition.h @@ -70,8 +70,7 @@ public: status_t Mount(const char* mountPoint = NULL, uint32 mountFlags = 0, - const char* parameters = NULL, - dev_t* devicePointer = NULL); + const char* parameters = NULL); status_t Unmount(uint32 unmountFlags = 0); // Hierarchy Info diff --git a/src/kits/storage/disk_device/Partition.cpp b/src/kits/storage/disk_device/Partition.cpp index 9e25b38f11..5aa133ac1b 100644 --- a/src/kits/storage/disk_device/Partition.cpp +++ b/src/kits/storage/disk_device/Partition.cpp @@ -518,8 +518,6 @@ BPartition::GetMountPoint(BPath* mountPoint) const \param mountFlags Currently only \c B_MOUNT_READ_ONLY is defined, which forces the volume to be mounted read-only. \param parameters File system specific mount parameters. - \param devicePointer Reference to the mounted filesystem for the programs - interested in it \return \c B_OK, if everything went fine, another error code otherwise. */ status_t @@ -571,12 +569,9 @@ BPartition::Mount(const char* mountPoint, uint32 mountFlags, } // update object, if successful - if (device >= 0) { - error = Device()->Update(); - if (devicePointer != NULL) - *devicePointer = device; - return error; - } + if (device >= 0) + return Device()->Update(); + return B_ERROR; }