* 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
@@ -26,21 +26,25 @@ extern "C" {
partition_id _user_get_next_disk_device_id(int32 *cookie, size_t *neededSize);
partition_id _user_find_disk_device(const char *filename, size_t *neededSize);
partition_id _user_find_partition(const char *filename, size_t *neededSize);
partition_id _user_find_file_disk_device(const char *filename,
size_t *neededSize);
status_t _user_get_disk_device_data(partition_id deviceID, bool deviceOnly,
user_disk_device_data *buffer, size_t bufferSize,
size_t *neededSize);
partition_id _user_register_file_device(const char *filename);
status_t _user_unregister_file_device(partition_id deviceID,
const char *filename);
const char *filename);
// Only a valid deviceID or filename need to be passed. The other one
// is -1/NULL. If both is given only filename is ignored.
status_t _user_get_file_disk_device_path(partition_id id, char* buffer,
size_t bufferSize);
// disk systems
status_t _user_get_disk_system_info(disk_system_id id,
user_disk_system_info *info);
user_disk_system_info *info);
status_t _user_get_next_disk_system_info(int32 *cookie,
user_disk_system_info *info);
user_disk_system_info *info);
status_t _user_find_disk_system(const char *name, user_disk_system_info *info);
// disk device modification