* 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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user