History log of /haiku-fatelf/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp
Revision Date Author Comments
# cfeeb9ae 07-Nov-2012 threedeyes <3dEyes@gmail.com>

Enable NTFS partition type in PartitionMap. Now we can create ntfs partitions.


# d57dba3c 29-Oct-2011 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Apply patch from ticket #7015 (slightly modified) by kallisti:

A cosmetic cleanup of the partition types for the Intel partition map.

* large number of partition types added (thanks fdisk!)
* clean up what partitions can be created


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


# 245df7ab 09-Feb-2011 Jérôme Duval <korli@users.berlios.de>

added exFAT partition type


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


# f6d3241d 08-Jan-2011 Axel Dörfler <axeld@pinc-software.de>

* Changed the Windows NT string to something understandable.


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


# 01929b0c 23-Oct-2010 Jérôme Duval <korli@users.berlios.de>

added a mapping for 0x83 to BTRFS


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


# 9494bb5b 17-Oct-2010 Bryce Groff <bgroff@hawaii.edu>

- Adds parameters column to DriveSetup.
- Parse and display "active" parameter. Fixes ticket: #4417
- Removes const declaration in PartitionMap::Check.


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


# 7813cb23 15-Oct-2010 Bryce Groff <bgroff@hawaii.edu>

- Truncate the previous partition if the current partition's offset lies within the previous partitions area.
- Fixed spelling mistake.


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


# 841fd969 03-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

Fixed indentation issue in my previous commit.


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


# 5e144a36 04-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

I don't know what recent change may have caused this, but I had to introduce the
check to avoid a division by zero when scanning my partition map in order to be
able to boot. I cannot spot any regressions, I can still access all my partitions
just fine.


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


# e4c0070f 28-Feb-2010 Michael Lotz <mmlr@mlotz.ch>

Added a bit of logic to possibly fall back to a fixed 512 block MBR in case
certain conditions indicate that we might deal with a fixed 512 bytes MBR on
a non 512 byte block size medium. One condition is that at least one partition
had to be shrunk to fit the available size (which usually happens with larger
block sizes). We retry with a fixed 512 block size once and compare the result
if it didn't improve the situation it is reverted again. This is mostly a
preparation for the upcoming "anyboot" hybrid MBR/ISO images.


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


# 878bda67 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Made the partition type of Solaris 10 partitions known. I am not quite
sure if Solaris uses this type for boot partitions only.


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


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

* Apparently, a drive's size is not always reported the same; at least I have
a drive (which had its MBR created on Linux) report a smaller size than the
size of its first partition.
* Since other operating systems seem to ignore this, we now relax our validity
checks and always adjust the size of a child partition to fit into its parent.


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


# 1987b05a 10-Aug-2009 Bryce Groff <bgroff@hawaii.edu>

* Added open_partition to disk_device_manager
* Rewrote PartitionMapWriter
* Updated style to match current style guide for the intel partitioning system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32235 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


# f3794156 07-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Partition type strings that we hand out we should also be able to handle. I.e.
we need to parse the "Unrecognized Type ..." strings we produce for partition
type IDs we can't match to a name. This fixes the "Failed to prepare
modifications" error the userland tools would produce when a partition with
such a type was encountered.


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


# 199f3324 13-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Removed SECTOR_SIZE in the read-only part of the intel partition scanner;
however, it's still used in the write part.
* Made the read-only code block size agnostic. Only tested with an Apple
iPod so far, and it recognizes its partition fine now. Next test on real
hardware.
* Cleanup.


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


# b41bbb4a 14-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Renamed partition_table_sector to partition_table, and PTS* to
PartitionTable*; the sector is not really a sector, but only the first
512 bytes of it.
* Cleanup.


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


# e9a10566 18-Sep-2008 Stephan Aßmus <superstippi@gmx.de>

Update some comments after understanding things better. Some things which got
me confused were perfectly correct.


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


# aecd884e 18-Sep-2008 Stephan Aßmus <superstippi@gmx.de>

* Added some hopefully helpful comments.
* Replaced my bogus comment that Ingo pointed out with a description that
mentions LogicalPartitions also being used to describe so called "inner
extended" partitions, which are only needed to point to the next PTS.


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


# f1c34ec3 18-Sep-2008 Stephan Aßmus <superstippi@gmx.de>

Ah yes, here is the TODO I wrote with regards to the comment in my earlier
commit.


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


# 27ba18f4 20-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Turned off debugging output (intel.cpp still puts out some stuff, but only
when compiled for the kernel).
* Minor cleanup.


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


# 1dedfc14 06-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

More specific tracing output when rejecting partitions.


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


# 260bb9a2 13-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a few handy methods. The PartitionType::Set*() methods return bool
(valid), now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22541 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


# c6aab459 12-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Small readability changes to the supported types functions.
* Moved the module definition to the end of the source file, so that the
lengthy prototype could be be removed.
* Fixed the *_supports_initializing() hooks.


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


# 288102e6 26-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Style cleanup.
* Moved method documentation from headers to source files.
* Removed test code.
* Added TODOs where I spotted problems.


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


# 92b8ea1d 24-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Write support for the Intel partitioning system module. Courtesy of
Tomas Kucera.


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


# f00c299f 05-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

Made adjusting the partition size a bit more strict (negative sizes aren't allowed
anymore; maybe we should even introduce a minimal partition size).
This fixes bug #882.


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


# 65bf7e89 03-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed typo in the BIOS work-around that should prevent booting from Intel partitions at all.


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


# 0e9f724c 02-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

* When run as part of the boot loader, it will now adjust the size of partitions
to fit into the session - this should help bug #238 to disappear.
* Minor cleanup.


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


# 50b6109c 29-Sep-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Build fix, at least for building on Linux. The host stdio.h has a different dprintf definition than BeOS.


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


# 8d9e5a45 29-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

* Turned on debugging in the Intel partitioning system add-on, and the partition
stuff of the boot loader to help with bug #238.
* Minor cleanup (added license headers, fixed debug output)


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


# deeb2f39 29-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

A bit of #ifdef'ing to make the stuff edible for userland compilation
with gcc 4.


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


# 311049d7 04-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Added a new PartitionMap::CountNonEmptyPartitions() - now, a partition map
is only accepted when there is at least one valid partition in it.
Before, the module would accept even the BFS boot loader which is now less
likely (IOW you can now boot with Bochs again).
Also, if there was one invalid partition, the partitions that come after
it are no longer ignored.


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


# f2162522 31-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* More debug output.
* We apparently cannot use constants like kPartitionTypeIntelExtended
in static array initializers in the kernel.
* Fixed misunderstanding between Axel (boot loader) and me (Intel
partitioning system module) how to deal with the cookie the
identify() hook returns. We switch to a someone cleaner method by
always invoking free_identify_cookie() for it, even if it were passed
to scan(). Since we want to keep the cookie, we add a reference
counter to it.
This should fix a couple of issues with recognizing the boot partition.


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


# b132797e 07-Sep-2003 Axel Dörfler <axeld@pinc-software.de>

Made the module working in the boot loader.


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


# 38cf1a98 22-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Small fixes. Make use of the types of types defined in <DiskDeviceTypes.h>.


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


# 852d12ef 13-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Ported the intel partitioning system module to the new interface
(disk device manager) and moved it to a nicer place.
First tests look good, though my hard disk structure doesn't even
have extended partitions. Going to install Linux now...


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


# cfeeb9ae6f2bc120a726de9470642016d774c3d8 07-Nov-2012 threedeyes <3dEyes@gmail.com>

Enable NTFS partition type in PartitionMap. Now we can create ntfs partitions.


# d57dba3c4e2afa1972d16e5538ad1d98d127a9ce 29-Oct-2011 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Apply patch from ticket #7015 (slightly modified) by kallisti:

A cosmetic cleanup of the partition types for the Intel partition map.

* large number of partition types added (thanks fdisk!)
* clean up what partitions can be created


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


# 245df7abd37e25abfbb4735d1caaf57cdcd43c22 09-Feb-2011 Jérôme Duval <korli@users.berlios.de>

added exFAT partition type


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


# f6d3241dac2e6b1076264d067991cf884adf07b9 08-Jan-2011 Axel Dörfler <axeld@pinc-software.de>

* Changed the Windows NT string to something understandable.


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


# 01929b0c9421c4b37c45e04c45129ab5fbe45dd2 23-Oct-2010 Jérôme Duval <korli@users.berlios.de>

added a mapping for 0x83 to BTRFS


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


# 9494bb5b1590d043cc4a4126b837911e5681436b 17-Oct-2010 Bryce Groff <bgroff@hawaii.edu>

- Adds parameters column to DriveSetup.
- Parse and display "active" parameter. Fixes ticket: #4417
- Removes const declaration in PartitionMap::Check.


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


# 7813cb23eb6306a36534197985a1f859ff4fb048 15-Oct-2010 Bryce Groff <bgroff@hawaii.edu>

- Truncate the previous partition if the current partition's offset lies within the previous partitions area.
- Fixed spelling mistake.


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


# 841fd9693917582651c18e37cdf686023dd18176 03-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

Fixed indentation issue in my previous commit.


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


# 5e144a360c6a30a11fc3d647cc1dc298ee6c41bc 04-Mar-2010 Stephan Aßmus <superstippi@gmx.de>

I don't know what recent change may have caused this, but I had to introduce the
check to avoid a division by zero when scanning my partition map in order to be
able to boot. I cannot spot any regressions, I can still access all my partitions
just fine.


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


# e4c0070fe64f204140fdd96ffef71e0ce7d36ba6 28-Feb-2010 Michael Lotz <mmlr@mlotz.ch>

Added a bit of logic to possibly fall back to a fixed 512 block MBR in case
certain conditions indicate that we might deal with a fixed 512 bytes MBR on
a non 512 byte block size medium. One condition is that at least one partition
had to be shrunk to fit the available size (which usually happens with larger
block sizes). We retry with a fixed 512 block size once and compare the result
if it didn't improve the situation it is reverted again. This is mostly a
preparation for the upcoming "anyboot" hybrid MBR/ISO images.


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


# 878bda6780aa63d531c05fb3347ca64d41994854 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Made the partition type of Solaris 10 partitions known. I am not quite
sure if Solaris uses this type for boot partitions only.


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


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

* Apparently, a drive's size is not always reported the same; at least I have
a drive (which had its MBR created on Linux) report a smaller size than the
size of its first partition.
* Since other operating systems seem to ignore this, we now relax our validity
checks and always adjust the size of a child partition to fit into its parent.


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


# 1987b05aa02e2c9b2ff9f852cff73a249af7175a 10-Aug-2009 Bryce Groff <bgroff@hawaii.edu>

* Added open_partition to disk_device_manager
* Rewrote PartitionMapWriter
* Updated style to match current style guide for the intel partitioning system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32235 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


# f37941569751e0c57554ccd1776816e46898d791 07-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Partition type strings that we hand out we should also be able to handle. I.e.
we need to parse the "Unrecognized Type ..." strings we produce for partition
type IDs we can't match to a name. This fixes the "Failed to prepare
modifications" error the userland tools would produce when a partition with
such a type was encountered.


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


# 199f33248dcde6cb2803ee4bd5938817ed30239e 13-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Removed SECTOR_SIZE in the read-only part of the intel partition scanner;
however, it's still used in the write part.
* Made the read-only code block size agnostic. Only tested with an Apple
iPod so far, and it recognizes its partition fine now. Next test on real
hardware.
* Cleanup.


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


# b41bbb4a46e75fd526ea9e02bab0c5685ddad403 14-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* Renamed partition_table_sector to partition_table, and PTS* to
PartitionTable*; the sector is not really a sector, but only the first
512 bytes of it.
* Cleanup.


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


# e9a105668deada67ce6e58b6ff00a67e8e57de5d 18-Sep-2008 Stephan Aßmus <superstippi@gmx.de>

Update some comments after understanding things better. Some things which got
me confused were perfectly correct.


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


# aecd884e05eb4900c35b98d9a745f5bf9b5f065e 18-Sep-2008 Stephan Aßmus <superstippi@gmx.de>

* Added some hopefully helpful comments.
* Replaced my bogus comment that Ingo pointed out with a description that
mentions LogicalPartitions also being used to describe so called "inner
extended" partitions, which are only needed to point to the next PTS.


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


# f1c34ec3ebf400a20bcf75c6cbab17a26e918927 18-Sep-2008 Stephan Aßmus <superstippi@gmx.de>

Ah yes, here is the TODO I wrote with regards to the comment in my earlier
commit.


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


# 27ba18f4123ec65b8f091927ca7eb5c62b6b6733 20-Aug-2008 Axel Dörfler <axeld@pinc-software.de>

* Turned off debugging output (intel.cpp still puts out some stuff, but only
when compiled for the kernel).
* Minor cleanup.


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


# 1dedfc14ae2005ab30f04704262c504d95654beb 06-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

More specific tracing output when rejecting partitions.


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


# 260bb9a2a1e855f9933532f033a1de49444e4329 13-Oct-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Added a few handy methods. The PartitionType::Set*() methods return bool
(valid), now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22541 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


# c6aab4598bd9fa9dcca6f930b0906d25f6df867a 12-Aug-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Small readability changes to the supported types functions.
* Moved the module definition to the end of the source file, so that the
lengthy prototype could be be removed.
* Fixed the *_supports_initializing() hooks.


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


# 288102e6c3dedbc9a4fbb295fc9234ec06c7aa18 26-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

* Style cleanup.
* Moved method documentation from headers to source files.
* Removed test code.
* Added TODOs where I spotted problems.


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


# 92b8ea1d4406a8743e60ef420d8684255316202f 24-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Write support for the Intel partitioning system module. Courtesy of
Tomas Kucera.


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


# f00c299faa28e885dd55998bbb36317d71349772 05-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

Made adjusting the partition size a bit more strict (negative sizes aren't allowed
anymore; maybe we should even introduce a minimal partition size).
This fixes bug #882.


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


# 65bf7e89c93e56f7d292278899c4aebf35df0923 03-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed typo in the BIOS work-around that should prevent booting from Intel partitions at all.


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


# 0e9f724cf848a82b76a65ea6c5144d197c554495 02-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

* When run as part of the boot loader, it will now adjust the size of partitions
to fit into the session - this should help bug #238 to disappear.
* Minor cleanup.


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


# 50b6109c5f08d14e6515124747d3d479e2563b60 29-Sep-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Build fix, at least for building on Linux. The host stdio.h has a different dprintf definition than BeOS.


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


# 8d9e5a451e2fb58549aba969c921614bb15d2607 29-Sep-2006 Axel Dörfler <axeld@pinc-software.de>

* Turned on debugging in the Intel partitioning system add-on, and the partition
stuff of the boot loader to help with bug #238.
* Minor cleanup (added license headers, fixed debug output)


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


# deeb2f399a15572234d802bb1ea4cfa0de61d2a6 29-Jan-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

A bit of #ifdef'ing to make the stuff edible for userland compilation
with gcc 4.


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


# 311049d75104d6ff977feb56c5eb76c0761a8dde 04-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Added a new PartitionMap::CountNonEmptyPartitions() - now, a partition map
is only accepted when there is at least one valid partition in it.
Before, the module would accept even the BFS boot loader which is now less
likely (IOW you can now boot with Bochs again).
Also, if there was one invalid partition, the partitions that come after
it are no longer ignored.


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


# f2162522b06c959f240c6e2f3a81717a92b95b80 31-Mar-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

* More debug output.
* We apparently cannot use constants like kPartitionTypeIntelExtended
in static array initializers in the kernel.
* Fixed misunderstanding between Axel (boot loader) and me (Intel
partitioning system module) how to deal with the cookie the
identify() hook returns. We switch to a someone cleaner method by
always invoking free_identify_cookie() for it, even if it were passed
to scan(). Since we want to keep the cookie, we add a reference
counter to it.
This should fix a couple of issues with recognizing the boot partition.


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


# b132797ec38dac2755fdc8954689aa1318f45f52 07-Sep-2003 Axel Dörfler <axeld@pinc-software.de>

Made the module working in the boot loader.


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


# 38cf1a986ccb98c927169133d0402d7b5df32607 22-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Small fixes. Make use of the types of types defined in <DiskDeviceTypes.h>.


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


# 852d12ef4ce8c211ebb201900500f2c018634545 13-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Ported the intel partitioning system module to the new interface
(disk device manager) and moved it to a nicer place.
First tests look good, though my hard disk structure doesn't even
have extended partitions. Going to install Linux now...


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