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:
Ingo Weinhold 2003-07-30 17:53:11 +00:00
parent 9e5ec2a534
commit eceac61bcb
2 changed files with 13 additions and 8 deletions

View File

@ -156,6 +156,7 @@ private:
private:
int32 fDeviceCookie;
int32 fDiskSystemCookie;
int32 fJobCookie;
// BDirectory *fPartitionAddOnDir;
// BDirectory *fFSAddOnDir;
// int32 fPartitionAddOnDirIndex;

View File

@ -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