[haiku-bugs] Re: [Haiku] #6724: Creating a second active partition should unactive the first one

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Fri, 10 Dec 2010 20:02:32 -0000

#6724: Creating a second active partition should unactive the first one
--------------------------------------+------------------------------
  Reporter:  starsseed                |        Owner:  bebop
      Type:  bug                      |       Status:  assigned
  Priority:  normal                   |    Milestone:  R1
 Component:  Applications/DriveSetup  |      Version:  R1/Development
Resolution:                           |     Keywords:
Blocked By:                           |  Has a Patch:  0
  Platform:  x86                      |     Blocking:
--------------------------------------+------------------------------

Comment (by bonefish):

 Replying to [comment:3 bebop]:
 > When the MBR was being written, the active partition was properly
 handled. The problem was that the partition_data was not being updated
 correctly. This means if one was to restart the computer the correct
 values for the active partition would be displayed.
 >
 > This patch is the quick and dirty fix to the problem. It sets all of the
 current primary partitions parameters to an empty string if the partition
 being created has the active flag set to true.
 >
 > This works as the intel disk system only uses the parameters string for
 the active partition. Any comments on how this should/could be handled are
 welcome.

 Actually that's not quite correct: [https://dev.haiku-
 os.org/browser/haiku/trunk/src/add-
 ons/kernel/partitioning_systems/intel/intel.cpp?rev=34377#L220]. Setting
 the string the same way would be more correct (refactoring that bit into a
 separate function would be a bonus :-)). Other than that the
 locking/marking partitions busy must be adjusted, since ATM
 `_user_create_child_partition()` does only mark the parent partition busy,
 not the also changed pre-existing children. This also holds true for other
 functions, like `_user_set_partition_parameters()`, BTW.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6724#comment:4>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: