From 032e49d5719d483f5f69d9a1548785140a25f0e0 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 22 Sep 2003 21:46:00 +0000 Subject: [PATCH] Partially implemented the class. Well, save the entirely unimportant Do() method, which prints only some debug output for now. ;-) git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4792 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../disk_device_manager/jobs/KResizeJob.cpp | 33 +++++++++++++++++++ .../disk_device_manager/jobs/KResizeJob.h | 6 +++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/kernel/core/disk_device_manager/jobs/KResizeJob.cpp b/src/kernel/core/disk_device_manager/jobs/KResizeJob.cpp index 01a440a3e0..1c22266536 100644 --- a/src/kernel/core/disk_device_manager/jobs/KResizeJob.cpp +++ b/src/kernel/core/disk_device_manager/jobs/KResizeJob.cpp @@ -1,3 +1,36 @@ // KResizeJob.cpp +#include + +#include + #include "KResizeJob.h" + +// debugging +//#define DBG(x) +#define DBG(x) x +#define OUT printf + +// constructor +KResizeJob::KResizeJob(partition_id parentID, partition_id partitionID, + off_t size, bool resizeContents) + : KDiskDeviceJob(B_DISK_DEVICE_JOB_RESIZE, partitionID, parentID), + fResizeContents(resizeContents) +{ + SetDescription("uninitializing partition"); +} + +// destructor +KResizeJob::~KResizeJob() +{ +} + +// Do +status_t +KResizeJob::Do() +{ +// TODO: implement + DBG(OUT("KResizeJob::Do(%ld)\n", PartitionID())); + return B_OK; +} + diff --git a/src/kernel/core/disk_device_manager/jobs/KResizeJob.h b/src/kernel/core/disk_device_manager/jobs/KResizeJob.h index 442a6eb681..c8717d0f0f 100644 --- a/src/kernel/core/disk_device_manager/jobs/KResizeJob.h +++ b/src/kernel/core/disk_device_manager/jobs/KResizeJob.h @@ -10,10 +10,14 @@ namespace DiskDevice { class KResizeJob : public KDiskDeviceJob { public: - KResizeJob(partition_id parent, partition_id partition, off_t size); + KResizeJob(partition_id parentID, partition_id partitionID, off_t size, + bool resizeContents); virtual ~KResizeJob(); virtual status_t Do(); + +private: + bool fResizeContents; }; } // namespace DiskDevice