* Fixed automounting all BFS disk when Tracker starts.
* Fixed mounting previously mounted partitions. fSettings was never initialized when restoring the settings. The code I removed earlier didn't do that either. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26548 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -45,6 +45,7 @@ All rights reserved.
|
|||||||
# include <DiskDeviceRoster.h>
|
# include <DiskDeviceRoster.h>
|
||||||
# include <DiskDevice.h>
|
# include <DiskDevice.h>
|
||||||
# include <DiskDeviceList.h>
|
# include <DiskDeviceList.h>
|
||||||
|
# include <DiskDeviceTypes.h>
|
||||||
# include <fs_volume.h>
|
# include <fs_volume.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -133,7 +134,7 @@ AutoMounter::_MountVolumes(mount_mode normal, mount_mode removable,
|
|||||||
|
|
||||||
if (mode == kRestorePreviousVolumes) {
|
if (mode == kRestorePreviousVolumes) {
|
||||||
// mount all volumes that were stored in the settings file
|
// mount all volumes that were stored in the settings file
|
||||||
const char *volumeName;
|
const char *volumeName = NULL;
|
||||||
BPath path;
|
BPath path;
|
||||||
if (partition->GetPath(&path) != B_OK
|
if (partition->GetPath(&path) != B_OK
|
||||||
|| partition->ContentName() == NULL
|
|| partition->ContentName() == NULL
|
||||||
@@ -142,7 +143,7 @@ AutoMounter::_MountVolumes(mount_mode normal, mount_mode removable,
|
|||||||
return false;
|
return false;
|
||||||
} else if (mode == kOnlyBFSVolumes) {
|
} else if (mode == kOnlyBFSVolumes) {
|
||||||
if (partition->ContentType() == NULL
|
if (partition->ContentType() == NULL
|
||||||
|| strcmp(partition->ContentType(), "BFS"))
|
|| strcmp(partition->ContentType(), kPartitionTypeBFS))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -367,7 +368,10 @@ AutoMounter::_ReadSettings()
|
|||||||
|
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
|
|
||||||
|
// update flags and modes from the message
|
||||||
_UpdateSettingsFromMessage(&message);
|
_UpdateSettingsFromMessage(&message);
|
||||||
|
// copy the previously mounted partitions
|
||||||
|
fSettings = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user