Added basic disk system management.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3477 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2003-06-11 21:59:27 +00:00
parent e2242e6916
commit 450c7dd609
2 changed files with 149 additions and 34 deletions
@@ -36,6 +36,12 @@ public:
// Disk Device / Partition Management
// manager must be locked
KDiskDevice *FindDevice(const char *path, bool noShadow = true);
KDiskDevice *FindDevice(partition_id id, bool noShadow = true);
KPartition *FindPartition(const char *path, bool noShadow = true);
KPartition *FindPartition(partition_id id, bool noShadow = true);
KDiskDevice *RegisterDevice(const char *path, bool noShadow = true);
KDiskDevice *RegisterDevice(partition_id id, bool noShadow = true);
KPartition *RegisterPartition(const char *path, bool noShadow = true);
@@ -74,11 +80,14 @@ public:
// by the registrar.
private:
KPartition *_FindPartition(partition_id id) const;
status_t _AddPartitioningSystem(const char *name);
status_t _AddFileSystem(const char *name);
status_t _AddDiskSystem(KDiskSystem *diskSystem);
BLocker fLock;
List<KDiskDevice*> fDevices; // TODO: Optimize!
List<KPartition*> fPartitions; //
List<KDiskSystem*> fDiskSystems; //
static KDiskDeviceManager *fDefaultManager;
};