Implemented disk device job iteration.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4142 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -156,6 +156,7 @@ private:
|
|||||||
private:
|
private:
|
||||||
int32 fDeviceCookie;
|
int32 fDeviceCookie;
|
||||||
int32 fDiskSystemCookie;
|
int32 fDiskSystemCookie;
|
||||||
|
int32 fJobCookie;
|
||||||
// BDirectory *fPartitionAddOnDir;
|
// BDirectory *fPartitionAddOnDir;
|
||||||
// BDirectory *fFSAddOnDir;
|
// BDirectory *fFSAddOnDir;
|
||||||
// int32 fPartitionAddOnDirIndex;
|
// int32 fPartitionAddOnDirIndex;
|
||||||
|
|||||||
@@ -3,15 +3,13 @@
|
|||||||
// by the OpenBeOS license.
|
// by the OpenBeOS license.
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|
||||||
#include <DiskDeviceRoster.h>
|
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <DiskDevice.h>
|
#include <DiskDevice.h>
|
||||||
|
#include <DiskDeviceJob.h>
|
||||||
#include <DiskDevicePrivate.h>
|
#include <DiskDevicePrivate.h>
|
||||||
#include <DiskDeviceRoster.h>
|
#include <DiskDeviceRoster.h>
|
||||||
//#include <DiskScannerAddOn.h>
|
|
||||||
#include <DiskSystem.h>
|
#include <DiskSystem.h>
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
#include <FindDirectory.h>
|
#include <FindDirectory.h>
|
||||||
@@ -46,7 +44,8 @@ static const int32 kAddOnDirCount
|
|||||||
*/
|
*/
|
||||||
BDiskDeviceRoster::BDiskDeviceRoster()
|
BDiskDeviceRoster::BDiskDeviceRoster()
|
||||||
: fDeviceCookie(0),
|
: fDeviceCookie(0),
|
||||||
fDiskSystemCookie(0)
|
fDiskSystemCookie(0),
|
||||||
|
fJobCookie(0)
|
||||||
// fPartitionAddOnDir(NULL),
|
// fPartitionAddOnDir(NULL),
|
||||||
// fFSAddOnDir(NULL),
|
// fFSAddOnDir(NULL),
|
||||||
// fPartitionAddOnDirIndex(0),
|
// fPartitionAddOnDirIndex(0),
|
||||||
@@ -125,16 +124,21 @@ BDiskDeviceRoster::RewindDiskSystems()
|
|||||||
status_t
|
status_t
|
||||||
BDiskDeviceRoster::GetNextActiveJob(BDiskDeviceJob *job)
|
BDiskDeviceRoster::GetNextActiveJob(BDiskDeviceJob *job)
|
||||||
{
|
{
|
||||||
// not implemented
|
if (!job)
|
||||||
return B_ERROR;
|
return B_BAD_VALUE;
|
||||||
|
user_disk_device_job_info info;
|
||||||
|
status_t error = _kern_get_next_disk_device_job_info(&fJobCookie, &info);
|
||||||
|
if (error == B_OK)
|
||||||
|
error = job->_SetTo(&info);
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
// RewindActiveJobs
|
// RewindActiveJobs
|
||||||
status_t
|
status_t
|
||||||
BDiskDeviceRoster::RewindActiveJobs()
|
BDiskDeviceRoster::RewindActiveJobs()
|
||||||
{
|
{
|
||||||
// not implemented
|
fJobCookie = 0;
|
||||||
return B_ERROR;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// RegisterFileDevice
|
// RegisterFileDevice
|
||||||
|
|||||||
Reference in New Issue
Block a user