Some changes to/fixes of the KDiskSystem interface and the disk system module interface.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3987 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2003-07-15 21:41:32 +00:00
parent a97769a5d3
commit 0fbb290f51
9 changed files with 388 additions and 35 deletions
@@ -55,14 +55,23 @@ public:
virtual bool SupportsResizingChild(KPartition *child); virtual bool SupportsResizingChild(KPartition *child);
virtual bool SupportsMoving(KPartition *partition, bool *whileMounted); virtual bool SupportsMoving(KPartition *partition, bool *whileMounted);
virtual bool SupportsMovingChild(KPartition *child); virtual bool SupportsMovingChild(KPartition *child);
virtual bool SupportsSettingName(KPartition *partition);
virtual bool SupportsSettingContentName(KPartition *partition,
bool *whileMounted);
virtual bool SupportsSettingType(KPartition *partition);
virtual bool SupportsCreatingChild(KPartition *partition); virtual bool SupportsCreatingChild(KPartition *partition);
virtual bool SupportsParentSystem(KDiskSystem *system); virtual bool SupportsDeletingChild(KPartition *child);
virtual bool SupportsChildSystem(KDiskSystem *system); virtual bool SupportsInitializing(KPartition *partition);
virtual bool SupportsInitializingChild(KPartition *child,
const char *diskSystem);
virtual bool ValidateResize(KPartition *partition, off_t *size); virtual bool ValidateResize(KPartition *partition, off_t *size);
virtual bool ValidateResizeChild(KPartition *partition, off_t *size); virtual bool ValidateResizeChild(KPartition *partition, off_t *size);
virtual bool ValidateMove(KPartition *partition, off_t *start); virtual bool ValidateMove(KPartition *partition, off_t *start);
virtual bool ValidateMoveChild(KPartition *partition, off_t *start); virtual bool ValidateMoveChild(KPartition *partition, off_t *start);
virtual bool ValidateSetName(KPartition *partition, char *name);
virtual bool ValidateSetContentName(KPartition *partition, char *name);
virtual bool ValidateSetType(KPartition *partition, const char *type);
virtual bool ValidateCreateChild(KPartition *partition, off_t *start, virtual bool ValidateCreateChild(KPartition *partition, off_t *start,
off_t *size, const char *type, off_t *size, const char *type,
const char *parameters); const char *parameters);
@@ -78,6 +87,11 @@ public:
int32 count, int32 count,
int32 *actualCount = NULL); int32 *actualCount = NULL);
virtual status_t GetNextSupportedType(KPartition *partition, int32 *cookie,
char *type);
virtual status_t GetTypeForContentType(const char *contentType,
char *type);
// Writing // Writing
// Device should not be locked. // Device should not be locked.
@@ -92,6 +106,12 @@ public:
KDiskDeviceJob *job); KDiskDeviceJob *job);
virtual status_t MoveChild(KPartition *child, off_t offset, virtual status_t MoveChild(KPartition *child, off_t offset,
KDiskDeviceJob *job); KDiskDeviceJob *job);
virtual status_t SetName(KPartition *partition, char *name,
KDiskDeviceJob *job);
virtual status_t SetContentName(KPartition *partition, char *name,
KDiskDeviceJob *job);
virtual status_t SetType(KPartition *partition, char *type,
KDiskDeviceJob *job);
virtual status_t CreateChild(KPartition *partition, off_t offset, virtual status_t CreateChild(KPartition *partition, off_t offset,
off_t size, const char *type, off_t size, const char *type,
const char *parameters, KDiskDeviceJob *job, const char *parameters, KDiskDeviceJob *job,
@@ -37,10 +37,13 @@ public:
bool *whileMounted); bool *whileMounted);
virtual bool SupportsResizing(KPartition *partition, bool *whileMounted); virtual bool SupportsResizing(KPartition *partition, bool *whileMounted);
virtual bool SupportsMoving(KPartition *partition, bool *whileMounted); virtual bool SupportsMoving(KPartition *partition, bool *whileMounted);
virtual bool SupportsParentSystem(KDiskSystem *system); virtual bool SupportsSettingContentName(KPartition *partition,
bool *whileMounted);
virtual bool SupportsInitializing(KPartition *partition);
virtual bool ValidateResize(KPartition *partition, off_t *size); virtual bool ValidateResize(KPartition *partition, off_t *size);
virtual bool ValidateMove(KPartition *partition, off_t *start); virtual bool ValidateMove(KPartition *partition, off_t *start);
virtual bool ValidateSetContentName(KPartition *partition, char *name);
virtual bool ValidateInitialize(KPartition *partition, virtual bool ValidateInitialize(KPartition *partition,
const char *parameters); const char *parameters);
virtual bool ValidateSetContentParameters(KPartition *child, virtual bool ValidateSetContentParameters(KPartition *child,
@@ -55,6 +58,8 @@ public:
KDiskDeviceJob *job); KDiskDeviceJob *job);
virtual status_t Move(KPartition *partition, off_t offset, virtual status_t Move(KPartition *partition, off_t offset,
KDiskDeviceJob *job); KDiskDeviceJob *job);
virtual status_t SetContentName(KPartition *partition, char *name,
KDiskDeviceJob *job);
virtual status_t Initialize(KPartition *partition, const char *parameters, virtual status_t Initialize(KPartition *partition, const char *parameters,
KDiskDeviceJob *job); KDiskDeviceJob *job);
virtual status_t SetContentParameters(KPartition *partition, virtual status_t SetContentParameters(KPartition *partition,
@@ -35,14 +35,23 @@ public:
virtual bool SupportsResizingChild(KPartition *child); virtual bool SupportsResizingChild(KPartition *child);
virtual bool SupportsMoving(KPartition *partition, bool *whileMounted); virtual bool SupportsMoving(KPartition *partition, bool *whileMounted);
virtual bool SupportsMovingChild(KPartition *child); virtual bool SupportsMovingChild(KPartition *child);
virtual bool SupportsCreatingChild(KPartition *child); virtual bool SupportsSettingName(KPartition *partition);
virtual bool SupportsParentSystem(KDiskSystem *system); virtual bool SupportsSettingContentName(KPartition *partition,
virtual bool SupportsChildSystem(KDiskSystem *system); bool *whileMounted);
virtual bool SupportsSettingType(KPartition *partition);
virtual bool SupportsCreatingChild(KPartition *partition);
virtual bool SupportsDeletingChild(KPartition *child);
virtual bool SupportsInitializing(KPartition *partition);
virtual bool SupportsInitializingChild(KPartition *child,
const char *diskSystem);
virtual bool ValidateResize(KPartition *partition, off_t *size); virtual bool ValidateResize(KPartition *partition, off_t *size);
virtual bool ValidateResizeChild(KPartition *partition, off_t *size); virtual bool ValidateResizeChild(KPartition *partition, off_t *size);
virtual bool ValidateMove(KPartition *partition, off_t *start); virtual bool ValidateMove(KPartition *partition, off_t *start);
virtual bool ValidateMoveChild(KPartition *partition, off_t *start); virtual bool ValidateMoveChild(KPartition *partition, off_t *start);
virtual bool ValidateSetName(KPartition *partition, char *name);
virtual bool ValidateSetContentName(KPartition *partition, char *name);
virtual bool ValidateSetType(KPartition *partition, const char *type);
virtual bool ValidateCreateChild(KPartition *partition, off_t *start, virtual bool ValidateCreateChild(KPartition *partition, off_t *start,
off_t *size, const char *type, off_t *size, const char *type,
const char *parameters); const char *parameters);
@@ -58,6 +67,11 @@ public:
int32 count, int32 count,
int32 *actualCount = NULL); int32 *actualCount = NULL);
virtual status_t GetNextSupportedType(KPartition *partition, int32 *cookie,
char *type);
virtual status_t GetTypeForContentType(const char *contentType,
char *type);
// Writing // Writing
virtual status_t Repair(KPartition *partition, bool checkOnly, virtual status_t Repair(KPartition *partition, bool checkOnly,
@@ -70,6 +84,12 @@ public:
KDiskDeviceJob *job); KDiskDeviceJob *job);
virtual status_t MoveChild(KPartition *child, off_t offset, virtual status_t MoveChild(KPartition *child, off_t offset,
KDiskDeviceJob *job); KDiskDeviceJob *job);
virtual status_t SetName(KPartition *partition, char *name,
KDiskDeviceJob *job);
virtual status_t SetContentName(KPartition *partition, char *name,
KDiskDeviceJob *job);
virtual status_t SetType(KPartition *partition, char *type,
KDiskDeviceJob *job);
virtual status_t CreateChild(KPartition *partition, off_t offset, virtual status_t CreateChild(KPartition *partition, off_t offset,
off_t size, const char *type, off_t size, const char *type,
const char *parameters, KDiskDeviceJob *job, const char *parameters, KDiskDeviceJob *job,
@@ -35,10 +35,18 @@ typedef bool (*partition_supports_moving_partition)(partition_data *partition,
bool *whileMounted); bool *whileMounted);
typedef bool (*partition_supports_moving_child_partition)( typedef bool (*partition_supports_moving_child_partition)(
partition_data *partition, partition_data *child); partition_data *partition, partition_data *child);
typedef bool (*partition_supports_setting_name)(partition_data *partition);
typedef bool (*partition_supports_setting_content_name)(
partition_data *partition);
typedef bool (*partition_supports_setting_type)(partition_data *partition);
typedef bool (*partition_supports_creating_child_partition)( typedef bool (*partition_supports_creating_child_partition)(
partition_data *partition); partition_data *partition);
typedef bool (*partition_supports_parent_system)(const char *system); typedef bool (*partition_supports_deleting_child_partition)(
typedef bool (*partition_supports_child_system)(const char *system); partition_data *partition, partition_data *child);
typedef bool (*partition_supports_initializing_partition)(
partition_data *partition);
typedef bool (*partition_supports_initializing_child_partition)(
partition_data *partition, const char *system);
typedef bool (*partition_validate_resize_partition)(partition_data *partition, typedef bool (*partition_validate_resize_partition)(partition_data *partition,
off_t *size); off_t *size);
@@ -48,6 +56,12 @@ typedef bool (*partition_validate_resize_child_partition)(
partition_data *partition, partition_data *child, off_t *size); partition_data *partition, partition_data *child, off_t *size);
typedef bool (*partition_validate_move_child_partition)( typedef bool (*partition_validate_move_child_partition)(
partition_data *partition, partition_data *child, off_t *start); partition_data *partition, partition_data *child, off_t *start);
typedef bool (*partition_validate_set_name)(partition_data *partition,
char *name);
typedef bool (*partition_validate_set_content_name)(partition_data *partition,
char *name);
typedef bool (*partition_validate_set_type)(partition_data *partition,
const char *type);
typedef bool (*partition_validate_create_child_partition)( typedef bool (*partition_validate_create_child_partition)(
partition_data *partition, partition_data *child, off_t *start, partition_data *partition, partition_data *child, off_t *start,
off_t *size, const char *type, const char *parameters); off_t *size, const char *type, const char *parameters);
@@ -61,6 +75,11 @@ typedef bool (*partition_get_partitionable_spaces)(partition_data *partition,
partitionable_space_data *spaces, int32 count, int32 *actualCount); partitionable_space_data *spaces, int32 count, int32 *actualCount);
// When not implemented, a standard algorithm is used. // When not implemented, a standard algorithm is used.
typedef bool (*partition_get_next_supported_type)(partition_data *partition,
int32 *cookie, char *type);
typedef bool (*partition_get_type_for_content_type)(partition_data *partition,
const char *contentType, char *type);
// writing // writing
// (device is NOT locked) // (device is NOT locked)
typedef status_t (*partition_repair_partition)(int fd, typedef status_t (*partition_repair_partition)(int fd,
@@ -73,6 +92,12 @@ typedef status_t (*partition_move_partition)(int fd,
partition_id partition, off_t offset, disk_job_id job); partition_id partition, off_t offset, disk_job_id job);
typedef status_t (*partition_move_child_partition)(int fd, typedef status_t (*partition_move_child_partition)(int fd,
partition_id partition, partition_id child, off_t offset, disk_job_id job); partition_id partition, partition_id child, off_t offset, disk_job_id job);
typedef status_t (*partition_set_name)(int fd, partition_id partition,
const char *name, disk_job_id job);
typedef status_t (*partition_set_content_name)(int fd, partition_id partition,
const char *name, disk_job_id job);
typedef status_t (*partition_set_type)(int fd, partition_id partition,
const char *type, disk_job_id job);
typedef status_t (*partition_create_child_partition)(int fd, typedef status_t (*partition_create_child_partition)(int fd,
partition_id partition, off_t offset, off_t size, const char *type, partition_id partition, off_t offset, off_t size, const char *type,
const char *parameters, disk_job_id job, partition_id *childID); const char *parameters, disk_job_id job, partition_id *childID);
@@ -106,15 +131,26 @@ typedef struct partition_module_info {
partition_supports_moving_partition supports_moving_partition; partition_supports_moving_partition supports_moving_partition;
partition_supports_moving_child_partition partition_supports_moving_child_partition
supports_moving_child_partition; supports_moving_child_partition;
partition_supports_setting_name supports_setting_name;
partition_supports_setting_content_name supports_setting_content_name;
partition_supports_setting_type supports_setting_type;
partition_supports_creating_child_partition partition_supports_creating_child_partition
supports_creating_child_partition; supports_creating_child_partition;
partition_supports_parent_system supports_parent_system; partition_supports_deleting_child_partition
partition_supports_child_system supports_child_system; supports_deleting_child_partition;
partition_supports_initializing_partition
supports_initializing_partition;
partition_supports_initializing_child_partition
supports_initializing_child_partition;
partition_validate_resize_partition validate_resize_partition; partition_validate_resize_partition validate_resize_partition;
partition_validate_resize_child_partition partition_validate_resize_child_partition
validate_resize_child_partition; validate_resize_child_partition;
partition_validate_move_partition validate_move_partition; partition_validate_move_partition validate_move_partition;
partition_validate_move_child_partition validate_move_child_partition; partition_validate_move_child_partition validate_move_child_partition;
partition_validate_set_name validate_set_name;
partition_validate_set_content_name validate_set_content_name;
partition_validate_set_type validate_set_type;
partition_validate_create_child_partition partition_validate_create_child_partition
validate_create_child_partition; validate_create_child_partition;
partition_validate_initialize_partition validate_initialize_partition; partition_validate_initialize_partition validate_initialize_partition;
@@ -123,6 +159,8 @@ typedef struct partition_module_info {
partition_validate_set_partition_content_parameters partition_validate_set_partition_content_parameters
validate_set_partition_content_parameters; validate_set_partition_content_parameters;
partition_get_partitionable_spaces get_partitionable_spaces; partition_get_partitionable_spaces get_partitionable_spaces;
partition_get_next_supported_type get_next_supported_type;
partition_get_type_for_content_type get_type_for_content_type;
// writing // writing
partition_repair_partition repair_partition; partition_repair_partition repair_partition;
@@ -130,6 +168,9 @@ typedef struct partition_module_info {
partition_resize_child_partition resize_child_partition; partition_resize_child_partition resize_child_partition;
partition_move_partition move_partition; partition_move_partition move_partition;
partition_move_child_partition move_child_partition; partition_move_child_partition move_child_partition;
partition_set_name set_name;
partition_set_content_name set_content_name;
partition_set_type set_type;
partition_create_child_partition create_child_partition; partition_create_child_partition create_child_partition;
partition_delete_child_partition delete_child_partition; partition_delete_child_partition delete_child_partition;
partition_initialize_partition initialize_partition; partition_initialize_partition initialize_partition;
@@ -161,12 +202,16 @@ typedef bool (*fs_supports_resizing_partition)(partition_data *partition,
bool *whileMounted); bool *whileMounted);
typedef bool (*fs_supports_moving_partition)(partition_data *partition, typedef bool (*fs_supports_moving_partition)(partition_data *partition,
bool *whileMounted); bool *whileMounted);
typedef bool (*fs_supports_parent_system)(const char *system); typedef bool (*fs_supports_setting_content_name)(partition_data *partition,
bool *whileMounted);
typedef bool (*fs_supports_initializing_partition)(partition_data *partition);
typedef bool (*fs_validate_resize_partition)(partition_data *partition, typedef bool (*fs_validate_resize_partition)(partition_data *partition,
off_t *size); off_t *size);
typedef bool (*fs_validate_move_partition)(partition_data *partition, typedef bool (*fs_validate_move_partition)(partition_data *partition,
off_t *start); off_t *start);
typedef bool (*fs_validate_set_content_name)(partition_data *partition,
char *name);
typedef bool (*fs_validate_initialize_partition)(partition_data *partition, typedef bool (*fs_validate_initialize_partition)(partition_data *partition,
const char *parameters); const char *parameters);
typedef bool (*fs_validate_set_partition_content_parameters)( typedef bool (*fs_validate_set_partition_content_parameters)(
@@ -182,6 +227,8 @@ typedef status_t (*fs_resize_partition)(int fd, partition_id partition,
off_t size, disk_job_id job); off_t size, disk_job_id job);
typedef status_t (*fs_move_partition)(int fd, partition_id partition, typedef status_t (*fs_move_partition)(int fd, partition_id partition,
off_t offset, disk_job_id job); off_t offset, disk_job_id job);
typedef status_t (*fs_set_content_name)(int fd, partition_id partition,
const char *name, disk_job_id job);
typedef status_t (*fs_initialize_partition)(const char *partition, typedef status_t (*fs_initialize_partition)(const char *partition,
const char *parameters, disk_job_id job); const char *parameters, disk_job_id job);
// This is pretty close to how the hook in R5 looked. Save the job ID, of // This is pretty close to how the hook in R5 looked. Save the job ID, of
@@ -205,9 +252,13 @@ typedef struct fs_module_info {
fs_supports_reparing_partition supports_reparing_partition; fs_supports_reparing_partition supports_reparing_partition;
fs_supports_resizing_partition supports_resizing_partition; fs_supports_resizing_partition supports_resizing_partition;
fs_supports_moving_partition supports_moving_partition; fs_supports_moving_partition supports_moving_partition;
fs_supports_parent_system supports_parent_system; fs_supports_setting_content_name supports_setting_content_name;
fs_supports_initializing_partition
supports_initializing_partition;
fs_validate_resize_partition validate_resize_partition; fs_validate_resize_partition validate_resize_partition;
fs_validate_move_partition validate_move_partition; fs_validate_move_partition validate_move_partition;
fs_validate_set_content_name validate_set_content_name;
fs_validate_initialize_partition validate_initialize_partition; fs_validate_initialize_partition validate_initialize_partition;
fs_validate_set_partition_content_parameters fs_validate_set_partition_content_parameters
validate_set_partition_content_parameters; validate_set_partition_content_parameters;
@@ -217,6 +268,7 @@ typedef struct fs_module_info {
fs_repair_partition repair_partition; fs_repair_partition repair_partition;
fs_resize_partition resize_partition; fs_resize_partition resize_partition;
fs_move_partition move_partition; fs_move_partition move_partition;
fs_set_content_name set_content_name;
fs_initialize_partition initialize_partition; fs_initialize_partition initialize_partition;
fs_set_partition_content_parameters fs_set_partition_content_parameters
set_partition_content_parameters; set_partition_content_parameters;
+5 -1
View File
@@ -275,9 +275,12 @@ static fs_module_info bfs_module = {
NULL, // supports_reparing_partition NULL, // supports_reparing_partition
NULL, // supports_resizing_partition NULL, // supports_resizing_partition
NULL, // supports_moving_partition NULL, // supports_moving_partition
NULL, // supports_parent_system NULL, // supports_setting_content_name
NULL, // supports_initializing_partition
NULL, // validate_resize_partition NULL, // validate_resize_partition
NULL, // validate_move_partition NULL, // validate_move_partition
NULL, // validate_set_content_name
NULL, // validate_initialize_partition NULL, // validate_initialize_partition
NULL, NULL,
// validate_set_partition_content_parameters // validate_set_partition_content_parameters
@@ -287,6 +290,7 @@ static fs_module_info bfs_module = {
NULL, // repair_partition NULL, // repair_partition
NULL, // resize_partition NULL, // resize_partition
NULL, // move_partition NULL, // move_partition
NULL, // set_content_name
NULL, // initialize_partition NULL, // initialize_partition
NULL, // set_partition_content_parameters NULL, // set_partition_content_parameters
}; };
@@ -312,19 +312,28 @@ static partition_module_info intel_partition_map_module = {
NULL, // supports_resizing_child_partition NULL, // supports_resizing_child_partition
NULL, // supports_moving_partition NULL, // supports_moving_partition
NULL, // supports_moving_child_partition NULL, // supports_moving_child_partition
NULL, // supports_setting_name
NULL, // supports_setting_content_name
NULL, // supports_setting_type
NULL, // supports_creating_child_partition NULL, // supports_creating_child_partition
NULL, // supports_parent_system NULL, // supports_deleting_child_partition
NULL, // supports_child_system NULL, // supports_initializing_partition
NULL, // supports_initializing_child_partition
NULL, // validate_resize_partition NULL, // validate_resize_partition
NULL, // validate_resize_child_partition NULL, // validate_resize_child_partition
NULL, // validate_move_partition NULL, // validate_move_partition
NULL, // validate_move_child_partition NULL, // validate_move_child_partition
NULL, // validate_set_name
NULL, // validate_set_content_name
NULL, // validate_set_type
NULL, // validate_create_child_partition NULL, // validate_create_child_partition
NULL, // validate_initialize_partition NULL, // validate_initialize_partition
NULL, // validate_set_partition_parameters NULL, // validate_set_partition_parameters
NULL, NULL, // validate_set_partition_content_parameters
// validate_set_partition_content_parameters NULL, // get_partitionable_spaces
NULL, // get_partitionable_spaces; NULL, // get_next_supported_type
NULL, // get_type_for_content_type
// writing // writing
NULL, // repair_partition NULL, // repair_partition
@@ -332,6 +341,9 @@ static partition_module_info intel_partition_map_module = {
NULL, // resize_child_partition NULL, // resize_child_partition
NULL, // move_partition NULL, // move_partition
NULL, // move_child_partition NULL, // move_child_partition
NULL, // set_name
NULL, // set_content_name
NULL, // set_type
NULL, // create_child_partition NULL, // create_child_partition
NULL, // delete_child_partition NULL, // delete_child_partition
NULL, // initialize_partition NULL, // initialize_partition
@@ -376,19 +388,28 @@ static partition_module_info intel_extended_partition_module = {
NULL, // supports_resizing_child_partition NULL, // supports_resizing_child_partition
NULL, // supports_moving_partition NULL, // supports_moving_partition
NULL, // supports_moving_child_partition NULL, // supports_moving_child_partition
NULL, // supports_setting_name
NULL, // supports_setting_content_name
NULL, // supports_setting_type
NULL, // supports_creating_child_partition NULL, // supports_creating_child_partition
NULL, // supports_parent_system NULL, // supports_deleting_child_partition
NULL, // supports_child_system NULL, // supports_initializing_partition
NULL, // supports_initializing_child_partition
NULL, // validate_resize_partition NULL, // validate_resize_partition
NULL, // validate_resize_child_partition NULL, // validate_resize_child_partition
NULL, // validate_move_partition NULL, // validate_move_partition
NULL, // validate_move_child_partition NULL, // validate_move_child_partition
NULL, // validate_set_name
NULL, // validate_set_content_name
NULL, // validate_set_type
NULL, // validate_create_child_partition NULL, // validate_create_child_partition
NULL, // validate_initialize_partition NULL, // validate_initialize_partition
NULL, // validate_set_partition_parameters NULL, // validate_set_partition_parameters
NULL, NULL, // validate_set_partition_content_parameters
// validate_set_partition_content_parameters NULL, // get_partitionable_spaces
NULL, // get_partitionable_spaces; NULL, // get_next_supported_type
NULL, // get_type_for_content_type
// writing // writing
NULL, // repair_partition NULL, // repair_partition
@@ -396,6 +417,9 @@ static partition_module_info intel_extended_partition_module = {
NULL, // resize_child_partition NULL, // resize_child_partition
NULL, // move_partition NULL, // move_partition
NULL, // move_child_partition NULL, // move_child_partition
NULL, // set_name
NULL, // set_content_name
NULL, // set_type
NULL, // create_child_partition NULL, // create_child_partition
NULL, // delete_child_partition NULL, // delete_child_partition
NULL, // initialize_partition NULL, // initialize_partition
@@ -213,25 +213,59 @@ KDiskSystem::SupportsMovingChild(KPartition *child)
return false; return false;
} }
// SupportsSettingName
bool
KDiskSystem::SupportsSettingName(KPartition *partition)
{
// to be implemented by derived classes
return false;
}
// SupportsSettingContentName
bool
KDiskSystem::SupportsSettingContentName(KPartition *partition,
bool *whileMounted)
{
// to be implemented by derived classes
return false;
}
// SupportsSettingType
bool
KDiskSystem::SupportsSettingType(KPartition *partition)
{
// to be implemented by derived classes
return false;
}
// SupportsCreatingChild // SupportsCreatingChild
bool bool
KDiskSystem::SupportsCreatingChild(KPartition *child) KDiskSystem::SupportsCreatingChild(KPartition *parent)
{ {
// to be implemented by derived classes // to be implemented by derived classes
return false; return false;
} }
// SupportsParentSystem // SupportsDeletingChild
bool bool
KDiskSystem::SupportsParentSystem(KDiskSystem *system) KDiskSystem::SupportsDeletingChild(KPartition *child)
{ {
// to be implemented by derived classes // to be implemented by derived classes
return false; return false;
} }
// SupportsChildSystem // SupportsInitializing
bool bool
KDiskSystem::SupportsChildSystem(KDiskSystem *system) KDiskSystem::SupportsInitializing(KPartition *partition)
{
// to be implemented by derived classes
return false;
}
// SupportsInitializingChild
bool
KDiskSystem::SupportsInitializingChild(KPartition *child,
const char *diskSystem)
{ {
// to be implemented by derived classes // to be implemented by derived classes
return false; return false;
@@ -269,6 +303,30 @@ KDiskSystem::ValidateMoveChild(KPartition *partition, off_t *start)
return false; return false;
} }
// ValidateSetName
bool
KDiskSystem::ValidateSetName(KPartition *partition, char *name)
{
// to be implemented by derived classes
return false;
}
// ValidateSetContentName
bool
KDiskSystem::ValidateSetContentName(KPartition *partition, char *name)
{
// to be implemented by derived classes
return false;
}
// ValidateSetType
bool
KDiskSystem::ValidateSetType(KPartition *partition, const char *type)
{
// to be implemented by derived classes
return false;
}
// ValidateCreateChild // ValidateCreateChild
bool bool
KDiskSystem::ValidateCreateChild(KPartition *partition, off_t *start, KDiskSystem::ValidateCreateChild(KPartition *partition, off_t *start,
@@ -323,6 +381,23 @@ KDiskSystem::GetPartitionableSpaces(KPartition *partition,
return false; return false;
} }
// GetNextSupportedType
status_t
KDiskSystem::GetNextSupportedType(KPartition *partition, int32 *cookie,
char *type)
{
// to be implemented by derived classes
return B_ENTRY_NOT_FOUND;
}
// GetTypeForContentType
status_t
KDiskSystem::GetTypeForContentType(const char *contentType, char *type)
{
// to be implemented by derived classes
return B_ENTRY_NOT_FOUND;
}
// Defragment // Defragment
status_t status_t
KDiskSystem::Defragment(KPartition *partition, KDiskDeviceJob *job) KDiskSystem::Defragment(KPartition *partition, KDiskDeviceJob *job)
@@ -372,6 +447,31 @@ KDiskSystem::MoveChild(KPartition *child, off_t offset, KDiskDeviceJob *job)
return B_ERROR; return B_ERROR;
} }
// SetName
status_t
KDiskSystem::SetName(KPartition *partition, char *name, KDiskDeviceJob *job)
{
// to be implemented by derived classes
return B_ERROR;
}
// SetContentName
status_t
KDiskSystem::SetContentName(KPartition *partition, char *name,
KDiskDeviceJob *job)
{
// to be implemented by derived classes
return B_ERROR;
}
// SetType
status_t
KDiskSystem::SetType(KPartition *partition, char *type, KDiskDeviceJob *job)
{
// to be implemented by derived classes
return B_ERROR;
}
// CreateChild // CreateChild
status_t status_t
KDiskSystem::CreateChild(KPartition *partition, off_t offset, off_t size, KDiskSystem::CreateChild(KPartition *partition, off_t offset, off_t size,
@@ -133,9 +133,18 @@ KFileSystem::SupportsMoving(KPartition *partition, bool *whileMounted)
return false; return false;
} }
// SupportsParentSystem // SupportsSettingContentName
bool bool
KFileSystem::SupportsParentSystem(KDiskSystem *system) KFileSystem::SupportsSettingContentName(KPartition *partition,
bool *whileMounted)
{
// to be implemented
return false;
}
// SupportsInitializing
bool
KFileSystem::SupportsInitializing(KPartition *partition)
{ {
// to be implemented // to be implemented
return false; return false;
@@ -157,6 +166,14 @@ KFileSystem::ValidateMove(KPartition *partition, off_t *start)
return false; return false;
} }
// ValidateSetContentName
bool
KFileSystem::ValidateSetContentName(KPartition *partition, char *name)
{
// to be implemented
return false;
}
// ValidateInitialize // ValidateInitialize
bool bool
KFileSystem::ValidateInitialize(KPartition *partition, const char *parameters) KFileSystem::ValidateInitialize(KPartition *partition, const char *parameters)
@@ -206,6 +223,15 @@ KFileSystem::Move(KPartition *partition, off_t offset, KDiskDeviceJob *job)
return B_ERROR; return B_ERROR;
} }
// SetContentName
status_t
KFileSystem::SetContentName(KPartition *partition, char *name,
KDiskDeviceJob *job)
{
// to be implemented
return B_ERROR;
}
// Initialize // Initialize
status_t status_t
KFileSystem::Initialize(KPartition *partition, const char *parameters, KFileSystem::Initialize(KPartition *partition, const char *parameters,
@@ -147,25 +147,59 @@ KPartitioningSystem::SupportsMovingChild(KPartition *child)
return false; return false;
} }
// SupportsSettingName
bool
KPartitioningSystem::SupportsSettingName(KPartition *partition)
{
// to be implemented
return false;
}
// SupportsSettingContentName
bool
KPartitioningSystem::SupportsSettingContentName(KPartition *partition,
bool *whileMounted)
{
// to be implemented
return false;
}
// SupportsSettingType
bool
KPartitioningSystem::SupportsSettingType(KPartition *partition)
{
// to be implemented
return false;
}
// SupportsCreatingChild // SupportsCreatingChild
bool bool
KPartitioningSystem::SupportsCreatingChild(KPartition *child) KPartitioningSystem::SupportsCreatingChild(KPartition *partition)
{ {
// to be implemented // to be implemented
return false; return false;
} }
// SupportsParentSystem // SupportsDeletingChild
bool bool
KPartitioningSystem::SupportsParentSystem(KDiskSystem *system) KPartitioningSystem::SupportsDeletingChild(KPartition *child)
{ {
// to be implemented // to be implemented
return false; return false;
} }
// SupportsChildSystem // SupportsInitializing
bool bool
KPartitioningSystem::SupportsChildSystem(KDiskSystem *system) KPartitioningSystem::SupportsInitializing(KPartition *partition)
{
// to be implemented
return false;
}
// SupportsInitializingChild
bool
KPartitioningSystem::SupportsInitializingChild(KPartition *child,
const char *diskSystem)
{ {
// to be implemented // to be implemented
return false; return false;
@@ -203,6 +237,30 @@ KPartitioningSystem::ValidateMoveChild(KPartition *partition, off_t *start)
return false; return false;
} }
// ValidateSetName
bool
KPartitioningSystem::ValidateSetName(KPartition *partition, char *name)
{
// to be implemented
return false;
}
// ValidateSetContentName
bool
KPartitioningSystem::ValidateSetContentName(KPartition *partition, char *name)
{
// to be implemented
return false;
}
// ValidateSetType
bool
KPartitioningSystem::ValidateSetType(KPartition *partition, const char *type)
{
// to be implemented
return false;
}
// ValidateCreateChild // ValidateCreateChild
bool bool
KPartitioningSystem::ValidateCreateChild(KPartition *partition, off_t *start, KPartitioningSystem::ValidateCreateChild(KPartition *partition, off_t *start,
@@ -258,6 +316,23 @@ KPartitioningSystem::GetPartitionableSpaces(KPartition *partition,
return false; return false;
} }
// GetNextSupportedType
status_t
KPartitioningSystem::GetNextSupportedType(KPartition *partition, int32 *cookie,
char *type)
{
// to be implemented
return B_ERROR;
}
// GetTypeForContentType
status_t
KPartitioningSystem::GetTypeForContentType(const char *contentType, char *type)
{
// to be implemented
return B_ERROR;
}
// Repair // Repair
status_t status_t
KPartitioningSystem::Repair(KPartition *partition, bool checkOnly, KPartitioningSystem::Repair(KPartition *partition, bool checkOnly,
@@ -303,6 +378,33 @@ KPartitioningSystem::MoveChild(KPartition *child, off_t offset,
return B_ERROR; return B_ERROR;
} }
// SetName
status_t
KPartitioningSystem::SetName(KPartition *partition, char *name,
KDiskDeviceJob *job)
{
// to be implemented
return B_ERROR;
}
// SetContentName
status_t
KPartitioningSystem::SetContentName(KPartition *partition, char *name,
KDiskDeviceJob *job)
{
// to be implemented
return B_ERROR;
}
// SetType
status_t
KPartitioningSystem::SetType(KPartition *partition, char *type,
KDiskDeviceJob *job)
{
// to be implemented
return B_ERROR;
}
// CreateChild // CreateChild
status_t status_t
KPartitioningSystem::CreateChild(KPartition *partition, off_t offset, KPartitioningSystem::CreateChild(KPartition *partition, off_t offset,