Added a find_disk_system(). I first thought, this might be a good idea, but I'm not so sure anymore.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3608 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -84,6 +84,9 @@ bool delete_partition(partition_id partitionID);
|
|||||||
void partition_modified(partition_id partitionID);
|
void partition_modified(partition_id partitionID);
|
||||||
// tells the disk device manager, that the parition has been modified
|
// tells the disk device manager, that the parition has been modified
|
||||||
|
|
||||||
|
// disk systems
|
||||||
|
disk_system_id find_disk_system(const char *name);
|
||||||
|
|
||||||
// jobs
|
// jobs
|
||||||
bool set_disk_device_job_status(disk_job_id job, uint32 status);
|
bool set_disk_device_job_status(disk_job_id job, uint32 status);
|
||||||
// probably not needed
|
// probably not needed
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
#include "disk_device_manager.h"
|
#include "disk_device_manager.h"
|
||||||
#include "KDiskDevice.h"
|
#include "KDiskDevice.h"
|
||||||
#include "KDiskDeviceManager.h"
|
#include "KDiskDeviceManager.h"
|
||||||
|
#include "KDiskDeviceUtils.h"
|
||||||
|
#include "KDiskSystem.h"
|
||||||
#include "KPartition.h"
|
#include "KPartition.h"
|
||||||
|
|
||||||
// debugging
|
// debugging
|
||||||
@@ -162,3 +164,15 @@ partition_modified(partition_id partitionID)
|
|||||||
// not implemented
|
// not implemented
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// find_disk_system
|
||||||
|
disk_system_id
|
||||||
|
find_disk_system(const char *name)
|
||||||
|
{
|
||||||
|
KDiskDeviceManager *manager = KDiskDeviceManager::Default();
|
||||||
|
if (ManagerLocker locker = manager) {
|
||||||
|
if (KDiskSystem *diskSystem = manager->DiskSystemWithName(name))
|
||||||
|
return diskSystem->ID();
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user