* Added optional partition_module_info::uninitialize() hook. It is supposed to
destroy the partitioning system's on-disk structure. * Adjusted the existing partitioning system implementations accordingly. Actually implemented the hook for the intel partitioning system. * Added Uninitialize() method to KDiskSystem and KPartitioningSystem. The latter implements the method calling the new module hook. * _user_uninitialize_partition(): Also let the disk system uninitialize the on-disk structure. This fixes the failure to initialize a disk device with BFS, when it contains a valid partition map with at least one partition. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42140 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2008, Haiku, Inc. All Rights Reserved.
|
||||
* Copyright 2003-2011, Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@@ -88,6 +88,8 @@ public:
|
||||
virtual status_t Initialize(KPartition* partition,
|
||||
const char* name, const char* parameters,
|
||||
disk_job_id job);
|
||||
virtual status_t Uninitialize(KPartition* partition,
|
||||
disk_job_id job);
|
||||
virtual status_t CreateChild(KPartition* partition, off_t offset,
|
||||
off_t size, const char* type,
|
||||
const char* name, const char* parameters,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2007, Haiku, Inc. All Rights Reserved.
|
||||
* Copyright 2003-2011, Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@@ -64,6 +64,8 @@ public:
|
||||
virtual status_t Initialize(KPartition* partition,
|
||||
const char* name, const char* parameters,
|
||||
disk_job_id job);
|
||||
virtual status_t Uninitialize(KPartition* partition,
|
||||
disk_job_id job);
|
||||
virtual status_t CreateChild(KPartition* partition, off_t offset,
|
||||
off_t size, const char* type,
|
||||
const char* name, const char* parameters,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2008, Haiku Inc.
|
||||
* Copyright 2003-2011, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _K_DISK_DEVICE_MODULES_H
|
||||
@@ -99,9 +99,11 @@ typedef struct partition_module_info {
|
||||
const char* parameters, disk_job_id job);
|
||||
status_t (*initialize)(int fd, partition_id partition, const char* name,
|
||||
const char *parameters, off_t partitionSize, disk_job_id job);
|
||||
status_t (*uninitialize)(int fd, partition_id partition,
|
||||
off_t partitionSize, disk_job_id job);
|
||||
status_t (*create_child)(int fd, partition_id partition, off_t offset,
|
||||
off_t size, const char* type, const char* name,
|
||||
const char* parameters, disk_job_id job,
|
||||
off_t size, const char* type, const char* name,
|
||||
const char* parameters, disk_job_id job,
|
||||
partition_id* childID);
|
||||
// childID is used for the return value, but is also an optional input
|
||||
// parameter -- -1 to be ignored
|
||||
|
||||
Reference in New Issue
Block a user