From c3cfd913b74d94a1d16ca83826b0aee06e077c6f Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 22 Sep 2003 21:48:33 +0000 Subject: [PATCH] Implemented CommitModifications(). We still need to extract port and token from the supplied messenger. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4794 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/storage/DiskDevice.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/kits/storage/DiskDevice.cpp b/src/kits/storage/DiskDevice.cpp index c8c93689bf..4d685e0f51 100644 --- a/src/kits/storage/DiskDevice.cpp +++ b/src/kits/storage/DiskDevice.cpp @@ -205,8 +205,19 @@ BDiskDevice::CommitModifications(bool synchronously, BMessenger progressMessenger, bool receiveCompleteProgressUpdates) { - // not implemented - return B_ERROR; + status_t error = InitCheck(); + if (error != B_OK) + return error; + if (!_IsShadow()) + return B_BAD_VALUE; + // TODO: Get port and token from the progressMessenger + port_id port = -1; + int32 token = -1; + error = _kern_commit_disk_device_modifications(ID(), port, token, + receiveCompleteProgressUpdates); + if (error == B_OK) + error = _SetTo(ID(), true, false, 0); + return error; } // CancelModifications