* KDiskDeviceManager::RescanDiskSystems() now also rescans all partitions with
the newly found disk systems. * _ScanPartition() now allows to restrict the disk systems to a predefined set. * _ScanPartition() now even scans partitions that already have a disk system assigned; if a better one is found, the existing one is replaced. It will ignore mounted or partitions with children, though. * KPartition now also stores the priority of the disk system assigned to it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26177 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -98,10 +98,16 @@ public:
|
||||
status_t StartMonitoring();
|
||||
|
||||
private:
|
||||
struct DeviceMap;
|
||||
struct DiskSystemMap;
|
||||
struct PartitionMap;
|
||||
struct PartitionSet;
|
||||
class DeviceWatcher;
|
||||
|
||||
static status_t _CheckMediaStatusDaemon(void* self);
|
||||
status_t _CheckMediaStatus();
|
||||
|
||||
status_t _RescanDiskSystems(bool fileSystems);
|
||||
status_t _RescanDiskSystems(DiskSystemMap& addedSystems, bool fileSystems);
|
||||
|
||||
status_t _AddPartitioningSystem(const char *name);
|
||||
status_t _AddFileSystem(const char *name);
|
||||
@@ -111,19 +117,14 @@ private:
|
||||
bool _RemoveDevice(KDiskDevice *device);
|
||||
|
||||
status_t _Scan(const char *path);
|
||||
status_t _ScanPartition(KPartition *partition, bool async);
|
||||
status_t _ScanPartition(KPartition *partition, bool async,
|
||||
DiskSystemMap* restrictScan = NULL);
|
||||
// the manager must be locked and the device write locked
|
||||
status_t _ScanPartition(KPartition *partition);
|
||||
// used by the other _ScanPartition() version only
|
||||
status_t _ScanPartition(KPartition *partition,
|
||||
DiskSystemMap* restrictScan);
|
||||
|
||||
status_t _AddRemoveMonitoring(const char *path, bool add);
|
||||
|
||||
struct DeviceMap;
|
||||
struct DiskSystemMap;
|
||||
struct PartitionMap;
|
||||
struct PartitionSet;
|
||||
class DeviceWatcher;
|
||||
|
||||
BLocker fLock;
|
||||
DeviceMap *fDevices;
|
||||
PartitionMap *fPartitions;
|
||||
|
||||
@@ -148,8 +148,9 @@ public:
|
||||
|
||||
// DiskSystem
|
||||
|
||||
void SetDiskSystem(KDiskSystem *diskSystem);
|
||||
void SetDiskSystem(KDiskSystem *diskSystem, float priority = 0.0f);
|
||||
KDiskSystem *DiskSystem() const;
|
||||
float DiskSystemPriority() const;
|
||||
KDiskSystem *ParentDiskSystem() const;
|
||||
// When setting a disk system, it must already be loaded.
|
||||
// The partition will load it too, hence it won't be unloaded before
|
||||
@@ -218,6 +219,7 @@ protected:
|
||||
KDiskDevice *fDevice;
|
||||
KPartition *fParent;
|
||||
KDiskSystem *fDiskSystem;
|
||||
float fDiskSystemPriority;
|
||||
ListenerSet *fListeners;
|
||||
uint32 fChangeFlags;
|
||||
int32 fChangeCounter;
|
||||
|
||||
Reference in New Issue
Block a user