[haiku-commits] Re: r41986 - haiku/trunk/src/kits/storage/disk_device

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 07 Jun 2011 14:45:05 +0200

On 2011-06-07 at 12:34:54 [+0200], Stephan Assmus <superstippi@xxxxxx> wrote:
> Am 07.06.2011 00:23, schrieb korli@xxxxxxxxxxxxxxxx:
> > Log:
> > Second try at fixing #7572 (after r41842). Please review.
> >
> > Modified: haiku/trunk/src/kits/storage/disk_device/Partition.cpp
> > ===================================================================
> > --- haiku/trunk/src/kits/storage/disk_device/Partition.cpp    2011-06-06 
> > 20:37:43 UTC (rev 41985)
> > +++ haiku/trunk/src/kits/storage/disk_device/Partition.cpp    2011-06-06 
> > 22:23:44 UTC (rev 41986)
> > @@ -1176,7 +1176,7 @@
> >   bool
> >   BPartition::CanInitialize(const char* diskSystem) const
> >   {
> > -    return fDelegate&&  fDelegate->CanInitialize(diskSystem);
> > +    return IsDevice() || (fDelegate&&  
> > fDelegate->CanInitialize(diskSystem));
> >   }
> 
> Without having looked at the surounding code recently, it looks a bit as
> if a partition would now always claim support for initializing if it's a
> device, even when the partitioning system in question does not support
> initializing.

Indeed. The change is definitely broken. Please Jérôme, before "fixing" it, 
try to understand what the cause of the problem is. Apparently 
CanInitialize() returns false for some reason. It would be helpful to 
investigate what that reason is.

CU, Ingo

Other related posts: