History log of /haiku/src/add-ons/kernel/partitioning_systems/intel/write_support.h
Revision Date Author Comments
# 9274ca84 11-Mar-2021 Adrien Destugues <pulkomandy@pulkomandy.tk>

intel partition map: implement changing the active partition

Implement the needed parts in both the userland add-on (loaded in
DriveSetup) and the kernel side one (used by disk system manager in the
kernel).

This allows changing the active partition in DriveSetup.

Change-Id: Ia65768b5f8f11d626ef24621ae7735723dcbc39d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3771
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 0b7fe5cb 12-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

partition_module_info::uninitialize(): Added block size parameter for
convenience.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42141 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 285f4cf4 12-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

* 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


# bdcd7fca 30-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Remove kernel/disk_device_manager from Jamfiles (the add-ons now need to
specify the path).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34377 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2ea893b2 29-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Bryce Groff: Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31907 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f96148c 20-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Bryce Groff with changes by myself:
* Added missing name parameter to the partitioning system module child creation
and child creation validation hooks. Pass the name to them.
* Added BPartitionParameterEditor interface, which is/will be used for editing
disk system specific parameters.
* Implemented partition parameter editors for BFS initialization and Intel
partition map child creation.
* Fixed the incorrect supported child partition type iteration in the Intel
partition map add-on. It does now return actual types.
* Handle the "active" flag parameter in the Intel partitioning system module.
* DriveSetup:
- Replaced the "Create" submenu by a simple menu item. The type can now by
chosen in the dialog.
- Make use of initialization and child creation parameter editors. Some
non-generic code has been moved to the respective editor implementations
(BFS, intel partitioning system).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31658 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf95c9ae 07-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* The shadow_changed() FS and partitioning system hooks take an
additional partition_data* child parameter now.
* _user_get_partitionable_spaces() doesn't need to copy the buffer into
the kernel, since it is no input parameter. It also copies back the
actual partitionable spaces count on error, now -- B_BUFFER_OVERFLOW
is returned when the buffer was too small, but then the count must be
returned too.
* Fixed several instances of syscall implementations that unloaded a disk
system, although they didn't load it in the first place. This screwed
up the load count with undesirable consequences.
* _user_create_child_partition() would set the size to the supplied
offset.
* Fixed broken loop in KPhysicalPartition::CreateShadowPartition().
* KPartition::RemoveChild() notified the listeners about the wrong
event.
* Intel partitioning module:
- The *_get_partitionable_spaces() correctly return B_BUFFER_OVERFLOW
now, if the supplied buffer is too small.
- Implemented a part of pm_shadow_changed(), which creates and updates
the PartitionMap, so that the validate_*() hooks have a chance to
work at all.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22475 a95241bf-73f2-0310-859d-f6bbb57e9c96


# db5c68ca 04-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added the partition size as parameter to the file and partitioning
system initialize() hooks. It's often the only info about the
partition one needs and thus locking the partition just to get it is
no longer necessary.
* intel partitioning system:
- Removed passing around block sizes. We require 512 byte sectors
anyway. In fact using the parent partition's block size was even
wrong.
- Simplified writing the partition map sector.
- Simplified and corrected the partition map initialization.
- We don't fail identifying a partition anymore, if the partition map
contains no partitions. We would never identify a freshly
initialized partition map before.
- Made pm_identify() more intelligent: It determines the priority to
return depending on whether the partition is the device itself and
whether we have recognized child partitions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22447 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bcc2eb0c 04-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved the write support code into a separate source file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22443 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0b7fe5cbe27f67b14944f2b6b8e9cfaba9c56e30 12-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

partition_module_info::uninitialize(): Added block size parameter for
convenience.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42141 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 285f4cf441dbc269553bee753d151cbf0074f232 12-Jun-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

* 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


# bdcd7fcadc390466fb110a55e0932bedc1232b14 30-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Remove kernel/disk_device_manager from Jamfiles (the add-ons now need to
specify the path).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34377 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2ea893b2a01db7fe83a90d0933e4f563206408ea 29-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Bryce Groff: Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31907 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f96148cacdbf4ed476c22e6e8148b7f44a91d9e 20-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Bryce Groff with changes by myself:
* Added missing name parameter to the partitioning system module child creation
and child creation validation hooks. Pass the name to them.
* Added BPartitionParameterEditor interface, which is/will be used for editing
disk system specific parameters.
* Implemented partition parameter editors for BFS initialization and Intel
partition map child creation.
* Fixed the incorrect supported child partition type iteration in the Intel
partition map add-on. It does now return actual types.
* Handle the "active" flag parameter in the Intel partitioning system module.
* DriveSetup:
- Replaced the "Create" submenu by a simple menu item. The type can now by
chosen in the dialog.
- Make use of initialization and child creation parameter editors. Some
non-generic code has been moved to the respective editor implementations
(BFS, intel partitioning system).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31658 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf95c9aee6c36516e5e98a4f8953659c402bbf74 07-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* The shadow_changed() FS and partitioning system hooks take an
additional partition_data* child parameter now.
* _user_get_partitionable_spaces() doesn't need to copy the buffer into
the kernel, since it is no input parameter. It also copies back the
actual partitionable spaces count on error, now -- B_BUFFER_OVERFLOW
is returned when the buffer was too small, but then the count must be
returned too.
* Fixed several instances of syscall implementations that unloaded a disk
system, although they didn't load it in the first place. This screwed
up the load count with undesirable consequences.
* _user_create_child_partition() would set the size to the supplied
offset.
* Fixed broken loop in KPhysicalPartition::CreateShadowPartition().
* KPartition::RemoveChild() notified the listeners about the wrong
event.
* Intel partitioning module:
- The *_get_partitionable_spaces() correctly return B_BUFFER_OVERFLOW
now, if the supplied buffer is too small.
- Implemented a part of pm_shadow_changed(), which creates and updates
the PartitionMap, so that the validate_*() hooks have a chance to
work at all.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22475 a95241bf-73f2-0310-859d-f6bbb57e9c96


# db5c68ca46ce6f291fa5c047035418f6ccc89817 04-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added the partition size as parameter to the file and partitioning
system initialize() hooks. It's often the only info about the
partition one needs and thus locking the partition just to get it is
no longer necessary.
* intel partitioning system:
- Removed passing around block sizes. We require 512 byte sectors
anyway. In fact using the parent partition's block size was even
wrong.
- Simplified writing the partition map sector.
- Simplified and corrected the partition map initialization.
- We don't fail identifying a partition anymore, if the partition map
contains no partitions. We would never identify a freshly
initialized partition map before.
- Made pm_identify() more intelligent: It determines the priority to
return depending on whether the partition is the device itself and
whether we have recognized child partitions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22447 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bcc2eb0c727b067c4f4aa2f163372cc70b6fe069 04-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved the write support code into a separate source file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22443 a95241bf-73f2-0310-859d-f6bbb57e9c96