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
@@ -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;
+12 -8
View File
@@ -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