Added a IsSubSystemFor() method to the KDiskSystem interface and respective calls for the module interfaces.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3996 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2003-07-16 21:00:01 +00:00
parent 007eb5f23c
commit 1f3f1294a8
9 changed files with 38 additions and 4 deletions

View File

@ -64,6 +64,7 @@ public:
virtual bool SupportsInitializing(KPartition *partition);
virtual bool SupportsInitializingChild(KPartition *child,
const char *diskSystem);
virtual bool IsSubSystemFor(KPartition *partition);
virtual bool ValidateResize(KPartition *partition, off_t *size);
virtual bool ValidateResizeChild(KPartition *partition, off_t *size);

View File

@ -40,6 +40,7 @@ public:
virtual bool SupportsSettingContentName(KPartition *partition,
bool *whileMounted);
virtual bool SupportsInitializing(KPartition *partition);
virtual bool IsSubSystemFor(KPartition *partition);
virtual bool ValidateResize(KPartition *partition, off_t *size);
virtual bool ValidateMove(KPartition *partition, off_t *start);

View File

@ -44,6 +44,7 @@ public:
virtual bool SupportsInitializing(KPartition *partition);
virtual bool SupportsInitializingChild(KPartition *child,
const char *diskSystem);
virtual bool IsSubSystemFor(KPartition *partition);
virtual bool ValidateResize(KPartition *partition, off_t *size);
virtual bool ValidateResizeChild(KPartition *partition, off_t *size);

View File

@ -47,6 +47,7 @@ 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_is_sub_system_for)(partition_data *partition);
typedef bool (*partition_validate_resize_partition)(partition_data *partition,
off_t *size);
@ -75,10 +76,10 @@ typedef bool (*partition_get_partitionable_spaces)(partition_data *partition,
partitionable_space_data *spaces, int32 count, int32 *actualCount);
// 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);
typedef status_t (*partition_get_next_supported_type)(
partition_data *partition, int32 *cookie, char *type);
typedef status_t (*partition_get_type_for_content_type)(
partition_data *partition, const char *contentType, char *type);
// writing
// (device is NOT locked)
@ -142,6 +143,7 @@ typedef struct partition_module_info {
supports_initializing_partition;
partition_supports_initializing_child_partition
supports_initializing_child_partition;
partition_is_sub_system_for is_sub_system_for;
partition_validate_resize_partition validate_resize_partition;
partition_validate_resize_child_partition
@ -205,6 +207,7 @@ typedef bool (*fs_supports_moving_partition)(partition_data *partition,
typedef bool (*fs_supports_setting_content_name)(partition_data *partition,
bool *whileMounted);
typedef bool (*fs_supports_initializing_partition)(partition_data *partition);
typedef bool (*fs_is_sub_system_for)(partition_data *partition);
typedef bool (*fs_validate_resize_partition)(partition_data *partition,
off_t *size);
@ -255,6 +258,7 @@ typedef struct fs_module_info {
fs_supports_setting_content_name supports_setting_content_name;
fs_supports_initializing_partition
supports_initializing_partition;
fs_is_sub_system_for is_sub_system_for;
fs_validate_resize_partition validate_resize_partition;
fs_validate_move_partition validate_move_partition;

View File

@ -277,6 +277,7 @@ static fs_module_info bfs_module = {
NULL, // supports_moving_partition
NULL, // supports_setting_content_name
NULL, // supports_initializing_partition
NULL, // is_sub_system_for
NULL, // validate_resize_partition
NULL, // validate_move_partition

View File

@ -319,6 +319,7 @@ static partition_module_info intel_partition_map_module = {
NULL, // supports_deleting_child_partition
NULL, // supports_initializing_partition
NULL, // supports_initializing_child_partition
NULL, // is_sub_system_for
NULL, // validate_resize_partition
NULL, // validate_resize_child_partition
@ -395,6 +396,7 @@ static partition_module_info intel_extended_partition_module = {
NULL, // supports_deleting_child_partition
NULL, // supports_initializing_partition
NULL, // supports_initializing_child_partition
NULL, // is_sub_system_for
NULL, // validate_resize_partition
NULL, // validate_resize_child_partition

View File

@ -271,6 +271,14 @@ KDiskSystem::SupportsInitializingChild(KPartition *child,
return false;
}
// IsSubSystemFor
bool
KDiskSystem::IsSubSystemFor(KPartition *partition)
{
// to be implemented by derived classes
return false;
}
// ValidateResize
bool
KDiskSystem::ValidateResize(KPartition *partition, off_t *size)

View File

@ -150,6 +150,14 @@ KFileSystem::SupportsInitializing(KPartition *partition)
return false;
}
// IsSubSystemFor
bool
KFileSystem::IsSubSystemFor(KPartition *partition)
{
// to be implemented
return false;
}
// ValidateResize
bool
KFileSystem::ValidateResize(KPartition *partition, off_t *size)

View File

@ -205,6 +205,14 @@ KPartitioningSystem::SupportsInitializingChild(KPartition *child,
return false;
}
// IsSubSystemFor
bool
KPartitioningSystem::IsSubSystemFor(KPartition *partition)
{
// to be implemented
return false;
}
// ValidateResize
bool
KPartitioningSystem::ValidateResize(KPartition *partition, off_t *size)