summaryrefslogtreecommitdiffhomepage
path: root/Private/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Private/Source')
-rw-r--r--Private/Source/DriveManager.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/Private/Source/DriveManager.cxx b/Private/Source/DriveManager.cxx
index 9fbba2ec..bc100a1a 100644
--- a/Private/Source/DriveManager.cxx
+++ b/Private/Source/DriveManager.cxx
@@ -25,11 +25,15 @@ DriveTraits &DriveSelector::GetMounted() {
}
bool DriveSelector::Mount(DriveTraits *drive) {
- if (drive && drive->fReady() && fDrive == nullptr) {
+ if (drive && drive->fReady()) {
+ if (fDrive != nullptr) {
+ this->Unmount();
+ }
+
fDrive = drive;
fDrive->fMount();
- kcout << "Mount drive: " << fDrive->fName << "\n";
+ kcout << "[Krnl] mounted: " << fDrive->fName << "\n";
return true;
}
@@ -40,12 +44,12 @@ bool DriveSelector::Mount(DriveTraits *drive) {
DriveTraits *DriveSelector::Unmount() {
if (!fDrive) return nullptr;
- auto drivePointer = fDrive;
+ DriveTraits *drivePointer = fDrive;
fDrive->fUnmount();
fDrive = nullptr;
- kcout << "Unmount drive: " << drivePointer->fName << "\n";
+ kcout << "[Krnl] unmounted: " << fDrive->fName << "\n";
return drivePointer;
}