* Made the use of file devices more convenient and complete by adding

the methods IsFile() and GetFilePath() to BDiskDevice, and
  BDiskDeviceRoster::GetFileDeviceForPath().
* Added new syscalls to implement this functionality.
* Added new flag B_DISK_DEVICE_IS_FILE.
* Fixed wrong operator precedence assumption in the BDiskDevice class at
  several places.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28052 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-10-13 21:51:43 +00:00
parent 42d02ade26
commit 38bbc95758
9 changed files with 147 additions and 22 deletions
+3
View File
@@ -37,6 +37,9 @@ public:
bool receiveCompleteProgressUpdates = true);
status_t CancelModifications();
bool IsFile() const;
status_t GetFilePath(BPath* path) const;
private:
friend class BDiskDeviceList;
friend class BDiskDeviceRoster;
+3 -1
View File
@@ -28,7 +28,7 @@ enum {
// Basic masks
B_DEVICE_REQUEST_MOUNT_POINT = 0x0001, // mount point changes
B_DEVICE_REQUEST_MOUNTING = 0x0002, // mounting/unmounting
B_DEVICE_REQUEST_PARTITION = 0x0004, // partition changes
B_DEVICE_REQUEST_PARTITION = 0x0004, // partition changes
B_DEVICE_REQUEST_DEVICE = 0x0008, // device changes (media changes)
B_DEVICE_REQUEST_DEVICE_LIST = 0x0010, // device additions/removals
B_DEVICE_REQUEST_JOB_LIST = 0x0020, // job addition/initiation/cancellation/completion
@@ -125,6 +125,8 @@ public:
BDiskDevice* device);
status_t GetPartitionForPath(const char* filename,
BDiskDevice* device, BPartition** _partition);
status_t GetFileDeviceForPath(const char* filename,
BDiskDevice* device);
status_t StartWatching(BMessenger target,
uint32 eventMask = B_DEVICE_REQUEST_ALL);