Load the disk system add-ons in PrepareModifications(). Otherwise the
delegates wouldn't be able to get them. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22603 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -23,6 +23,8 @@
|
|||||||
#include <syscalls.h>
|
#include <syscalls.h>
|
||||||
#include <disk_device_manager/ddm_userland_interface.h>
|
#include <disk_device_manager/ddm_userland_interface.h>
|
||||||
|
|
||||||
|
#include "DiskSystemAddOnManager.h"
|
||||||
|
|
||||||
|
|
||||||
/*! \class BDiskDevice
|
/*! \class BDiskDevice
|
||||||
\brief A BDiskDevice object represents a storage device.
|
\brief A BDiskDevice object represents a storage device.
|
||||||
@@ -226,6 +228,11 @@ BDiskDevice::PrepareModifications()
|
|||||||
if (fDelegate)
|
if (fDelegate)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
|
// make sure the disk system add-ons are loaded
|
||||||
|
error = DiskSystemAddOnManager::Default()->LoadDiskSystems();
|
||||||
|
if (error != B_OK)
|
||||||
|
return error;
|
||||||
|
|
||||||
// recursively create the delegates
|
// recursively create the delegates
|
||||||
error = _CreateDelegates();
|
error = _CreateDelegates();
|
||||||
|
|
||||||
@@ -234,8 +241,10 @@ BDiskDevice::PrepareModifications()
|
|||||||
error = _InitDelegates();
|
error = _InitDelegates();
|
||||||
|
|
||||||
// delete all of them, if something went wrong
|
// delete all of them, if something went wrong
|
||||||
if (error != B_OK)
|
if (error != B_OK) {
|
||||||
_DeleteDelegates();
|
_DeleteDelegates();
|
||||||
|
DiskSystemAddOnManager::Default()->UnloadDiskSystems();
|
||||||
|
}
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
@@ -262,6 +271,7 @@ BDiskDevice::CommitModifications(bool synchronously,
|
|||||||
// TODO: Implement!
|
// TODO: Implement!
|
||||||
|
|
||||||
_DeleteDelegates();
|
_DeleteDelegates();
|
||||||
|
DiskSystemAddOnManager::Default()->UnloadDiskSystems();
|
||||||
|
|
||||||
if (error == B_OK)
|
if (error == B_OK)
|
||||||
error = _SetTo(ID(), true, false, 0);
|
error = _SetTo(ID(), true, false, 0);
|
||||||
@@ -286,6 +296,7 @@ BDiskDevice::CancelModifications()
|
|||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
_DeleteDelegates();
|
_DeleteDelegates();
|
||||||
|
DiskSystemAddOnManager::Default()->UnloadDiskSystems();
|
||||||
|
|
||||||
if (error == B_OK)
|
if (error == B_OK)
|
||||||
error = _SetTo(ID(), true, false, 0);
|
error = _SetTo(ID(), true, false, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user