Pass a session_info to the partition functions, rather than a bunch of individual variables.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2297 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -17,13 +17,13 @@ typedef status_t (*disk_scanner_get_session_module_hook)(int deviceFD,
|
|||||||
off_t deviceSize, int32 blockSize,
|
off_t deviceSize, int32 blockSize,
|
||||||
struct session_module_info **sessionModule);
|
struct session_module_info **sessionModule);
|
||||||
typedef status_t (*disk_scanner_get_partition_module_hook)(int deviceFD,
|
typedef status_t (*disk_scanner_get_partition_module_hook)(int deviceFD,
|
||||||
off_t sessionOffset, off_t sessionSize, int32 blockSize,
|
const struct session_info *sessionInfo,
|
||||||
struct partition_module_info **partitionModule);
|
struct partition_module_info **partitionModule);
|
||||||
|
|
||||||
typedef status_t (*disk_scanner_get_nth_session_info_hook)(int deviceFD,
|
typedef status_t (*disk_scanner_get_nth_session_info_hook)(int deviceFD,
|
||||||
int32 index, struct session_info *sessionInfo);
|
int32 index, struct session_info *sessionInfo);
|
||||||
typedef status_t (*disk_scanner_get_nth_partition_info_hook)(int deviceFD,
|
typedef status_t (*disk_scanner_get_nth_partition_info_hook)(int deviceFD,
|
||||||
off_t sessionOffset, off_t sessionSize,
|
const struct session_info *sessionInfo, int32 partitionIndex,
|
||||||
struct extended_partition_info *partitionInfo);
|
struct extended_partition_info *partitionInfo);
|
||||||
typedef status_t (*disk_scanner_get_partition_fs_info_hook)(int deviceFD,
|
typedef status_t (*disk_scanner_get_partition_fs_info_hook)(int deviceFD,
|
||||||
struct extended_partition_info *partitionInfo);
|
struct extended_partition_info *partitionInfo);
|
||||||
@@ -66,10 +66,7 @@ typedef struct disk_scanner_module_info {
|
|||||||
|
|
||||||
params:
|
params:
|
||||||
deviceFD: a device FD
|
deviceFD: a device FD
|
||||||
sessionOffset: start of the session in bytes from the beginning of the
|
sessionInfo: a complete info about the session the partition resides on
|
||||||
device
|
|
||||||
sessionSize: size of the session in bytes
|
|
||||||
blockSize: the logical block size
|
|
||||||
partitionModule: buffer the pointer to the found module_info shall be
|
partitionModule: buffer the pointer to the found module_info shall be
|
||||||
written into
|
written into
|
||||||
|
|
||||||
@@ -105,6 +102,9 @@ typedef struct disk_scanner_module_info {
|
|||||||
the indexth partition on the specified session:
|
the indexth partition on the specified session:
|
||||||
* offset
|
* offset
|
||||||
* size
|
* size
|
||||||
|
* logical_block_size
|
||||||
|
* session
|
||||||
|
* partition
|
||||||
* flags
|
* flags
|
||||||
* partition_name
|
* partition_name
|
||||||
* partition_type
|
* partition_type
|
||||||
@@ -112,16 +112,9 @@ typedef struct disk_scanner_module_info {
|
|||||||
|
|
||||||
params:
|
params:
|
||||||
deviceFD: a device FD
|
deviceFD: a device FD
|
||||||
sessionOffset: start of the session in bytes from the beginning of the
|
sessionInfo: a complete info about the session the partition resides on
|
||||||
device
|
partitionIndex: partition index
|
||||||
sessionSize: size of the session in bytes
|
partitionInfo: the partition info to be filled in
|
||||||
partitionInfo: the partition info
|
|
||||||
|
|
||||||
The following fields of partitionInfo are required to be set when the
|
|
||||||
functions is invoked:
|
|
||||||
* logical_block_size
|
|
||||||
* session
|
|
||||||
* partition
|
|
||||||
|
|
||||||
The function first tries to find a suitable partition module and to
|
The function first tries to find a suitable partition module and to
|
||||||
delagate the work to that module. If no module could be found, for
|
delagate the work to that module. If no module could be found, for
|
||||||
|
|||||||
@@ -7,11 +7,10 @@
|
|||||||
|
|
||||||
struct extended_partition_info;
|
struct extended_partition_info;
|
||||||
|
|
||||||
typedef bool (*partition_identify_hook)(int deviceFD, off_t sessionOffset,
|
typedef bool (*partition_identify_hook)(int deviceFD,
|
||||||
off_t sessionSize, const uchar *block, int32 blockSize);
|
const struct session_info *session, const uchar *block);
|
||||||
typedef status_t (*partition_get_nth_info_hook)(int deviceFD,
|
typedef status_t (*partition_get_nth_info_hook)(int deviceFD,
|
||||||
off_t sessionOffset, off_t sessionSize, const uchar *block,
|
const struct session_info *session, const uchar *block, int32 index,
|
||||||
int32 blockSize, int32 index,
|
|
||||||
struct extended_partition_info *partitionInfo);
|
struct extended_partition_info *partitionInfo);
|
||||||
|
|
||||||
typedef struct partition_module_info {
|
typedef struct partition_module_info {
|
||||||
@@ -30,11 +29,8 @@ typedef struct partition_module_info {
|
|||||||
|
|
||||||
params:
|
params:
|
||||||
deviceFD: a device FD
|
deviceFD: a device FD
|
||||||
sessionOffset: start of the session in bytes from the beginning of the
|
sessionInfo: a complete info about the session the partition resides on
|
||||||
device
|
|
||||||
sessionSize: size of the session in bytes
|
|
||||||
block: the first block of the session
|
block: the first block of the session
|
||||||
blockSize: the logical block size
|
|
||||||
|
|
||||||
|
|
||||||
get_nth_info():
|
get_nth_info():
|
||||||
@@ -51,11 +47,8 @@ typedef struct partition_module_info {
|
|||||||
|
|
||||||
params:
|
params:
|
||||||
deviceFD: a device FD
|
deviceFD: a device FD
|
||||||
sessionOffset: start of the session in bytes from the beginning of the
|
sessionInfo: a complete info about the session the partition resides on
|
||||||
device
|
|
||||||
sessionSize: size of the session in bytes
|
|
||||||
block: the first block of the session
|
block: the first block of the session
|
||||||
blockSize: the logical block size
|
|
||||||
index: the partition index
|
index: the partition index
|
||||||
partitionInfo: the partition info
|
partitionInfo: the partition info
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user