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:
parent
9e5ec2a534
commit
eceac61bcb
@ -156,6 +156,7 @@ private:
|
||||
private:
|
||||
int32 fDeviceCookie;
|
||||
int32 fDiskSystemCookie;
|
||||
int32 fJobCookie;
|
||||
// BDirectory *fPartitionAddOnDir;
|
||||
// BDirectory *fFSAddOnDir;
|
||||
// int32 fPartitionAddOnDirIndex;
|
||||
|
@ -3,15 +3,13 @@
|
||||
// by the OpenBeOS license.
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
#include <DiskDeviceRoster.h>
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <Directory.h>
|
||||
#include <DiskDevice.h>
|
||||
#include <DiskDeviceJob.h>
|
||||
#include <DiskDevicePrivate.h>
|
||||
#include <DiskDeviceRoster.h>
|
||||
//#include <DiskScannerAddOn.h>
|
||||
#include <DiskSystem.h>
|
||||
#include <Entry.h>
|
||||
#include <FindDirectory.h>
|
||||
@ -46,7 +44,8 @@ static const int32 kAddOnDirCount
|
||||
*/
|
||||
BDiskDeviceRoster::BDiskDeviceRoster()
|
||||
: fDeviceCookie(0),
|
||||
fDiskSystemCookie(0)
|
||||
fDiskSystemCookie(0),
|
||||
fJobCookie(0)
|
||||
// fPartitionAddOnDir(NULL),
|
||||
// fFSAddOnDir(NULL),
|
||||
// fPartitionAddOnDirIndex(0),
|
||||
@ -125,16 +124,21 @@ BDiskDeviceRoster::RewindDiskSystems()
|
||||
status_t
|
||||
BDiskDeviceRoster::GetNextActiveJob(BDiskDeviceJob *job)
|
||||
{
|
||||
// not implemented
|
||||
return B_ERROR;
|
||||
if (!job)
|
||||
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
|
||||
status_t
|
||||
BDiskDeviceRoster::RewindActiveJobs()
|
||||
{
|
||||
// not implemented
|
||||
return B_ERROR;
|
||||
fJobCookie = 0;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
// RegisterFileDevice
|
||||
|
Loading…
Reference in New Issue
Block a user