Support for creating and deleting (the latter not yet implemented) file disk devices. Added file system addition.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3601 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2003-06-22 23:00:20 +00:00
parent bdc530c737
commit 38d5e95af9
2 changed files with 105 additions and 15 deletions
@@ -14,6 +14,7 @@ class KDiskDevice;
class KDiskDeviceJob;
class KDiskDeviceJobQueue;
class KDiskSystem;
class KFileDiskDevice;
class KPartition;
class KDiskDeviceManager {
@@ -41,12 +42,19 @@ public:
KDiskDevice *FindDevice(partition_id id, bool noShadow = true);
KPartition *FindPartition(const char *path, bool noShadow = true);
KPartition *FindPartition(partition_id id, bool noShadow = true);
KFileDiskDevice *FindFileDevice(const char *filePath,
bool noShadow = true);
KDiskDevice *RegisterDevice(const char *path, bool noShadow = true);
KDiskDevice *RegisterDevice(partition_id id, bool noShadow = true);
KDiskDevice *RegisterNextDevice(int32 *cookie);
KPartition *RegisterPartition(const char *path, bool noShadow = true);
KPartition *RegisterPartition(partition_id id, bool noShadow = true);
KFileDiskDevice *RegisterFileDevice(const char *filePath,
bool noShadow = true);
status_t CreateFileDevice(const char *filePath, int32 *device = 0);
status_t DeleteFileDevice(const char *filePath);
// manager must be locked
int32 CountDevices();
@@ -94,6 +102,7 @@ private:
bool _RemoveDevice(KDiskDevice *device);
status_t _Scan(const char *path);
status_t _ScanDevice(KDiskDevice *device);
status_t _ScanPartition(KPartition *partition);
BLocker fLock;