Got rid of the module_identify() hook. Instead the module info features a short_name field now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2554 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -29,15 +29,22 @@ typedef status_t (*partition_partition_hook)(int deviceFD,
|
|||||||
|
|
||||||
typedef struct partition_module_info {
|
typedef struct partition_module_info {
|
||||||
module_info module;
|
module_info module;
|
||||||
|
const char *short_name;
|
||||||
|
|
||||||
partition_identify_hook identify;
|
partition_identify_hook identify;
|
||||||
partition_get_nth_info_hook get_nth_info;
|
partition_get_nth_info_hook get_nth_info;
|
||||||
partition_identify_module_hook identify_module;
|
|
||||||
partition_get_partitioning_params_hook get_partitioning_params;
|
partition_get_partitioning_params_hook get_partitioning_params;
|
||||||
partition_partition_hook partition;
|
partition_partition_hook partition;
|
||||||
} partition_module_info;
|
} partition_module_info;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
short_name:
|
||||||
|
----------
|
||||||
|
|
||||||
|
Identifies the module. That's the identifier to be passed to
|
||||||
|
partition_session().
|
||||||
|
|
||||||
|
|
||||||
identify():
|
identify():
|
||||||
----------
|
----------
|
||||||
|
|
||||||
@@ -76,18 +83,6 @@ typedef struct partition_module_info {
|
|||||||
range.
|
range.
|
||||||
|
|
||||||
|
|
||||||
identify_module():
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
Returns whether the module knows the supplied identifier. The module to
|
|
||||||
be used to partition a session is identified by this identifier.
|
|
||||||
|
|
||||||
params:
|
|
||||||
identifier: the identifier
|
|
||||||
|
|
||||||
Returns true, if the module knows the identifier, false otherwise.
|
|
||||||
|
|
||||||
|
|
||||||
get_partitioning_params():
|
get_partitioning_params():
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
|
|
||||||
#define INTEL_PARTITION_MODULE_NAME "disk_scanner/partition/intel/v1"
|
#define INTEL_PARTITION_MODULE_NAME "disk_scanner/partition/intel/v1"
|
||||||
|
|
||||||
|
// partition module identifier
|
||||||
|
//static const char *const kShortModuleName = "intel";
|
||||||
|
#define kShortModuleName "intel"
|
||||||
|
|
||||||
// the maximal number of partitions we support (size of some static arrays)
|
// the maximal number of partitions we support (size of some static arrays)
|
||||||
static const int32 MAX_PARTITION_COUNT = 64;
|
static const int32 MAX_PARTITION_COUNT = 64;
|
||||||
|
|
||||||
@@ -427,14 +431,6 @@ intel_get_nth_info(int deviceFD, const session_info *sessionInfo,
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
// intel_identify_module
|
|
||||||
static
|
|
||||||
bool
|
|
||||||
intel_identify_module(const char *identifier)
|
|
||||||
{
|
|
||||||
return (identifier && !strcmp(identifier, "intel"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// intel_get_partitioning_params
|
// intel_get_partitioning_params
|
||||||
static
|
static
|
||||||
status_t
|
status_t
|
||||||
@@ -466,9 +462,10 @@ static partition_module_info intel_partition_module =
|
|||||||
0, // better B_KEEP_LOADED?
|
0, // better B_KEEP_LOADED?
|
||||||
std_ops
|
std_ops
|
||||||
},
|
},
|
||||||
|
kShortModuleName,
|
||||||
|
|
||||||
intel_identify,
|
intel_identify,
|
||||||
intel_get_nth_info,
|
intel_get_nth_info,
|
||||||
intel_identify_module,
|
|
||||||
intel_get_partitioning_params,
|
intel_get_partitioning_params,
|
||||||
intel_partition,
|
intel_partition,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user