[haiku-gsoc] Re: About one week left before the coding period begins!

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Fri, 15 May 2009 23:53:20 +0200

On 2009-05-15 at 17:23:37 [+0200], Stephan Aßmus <superstippi@xxxxxx> wrote:
> Ingo Weinhold schrieb:
> > On 2009-05-15 at 15:15:17 [+0200], Stephan Aßmus <superstippi@xxxxxx> 
> > wrote:
> >> Matt Madia schrieb:
> >>> Bryce: Make sure you have something to test creating partitions on.
> >>> As I've suggested earlier, using a USB stick may be the cheapest
> >>> method.
> >> When I worked on this myself, it seemed to be a good method to simply
> >> setup another virtual harddisk in the emulator. I used VirtualBox at the
> >> time. Haiku picked up the second drive just fine, and this already poses
> >> the first challenge: The Disk Device backend in the kernel does not
> >> allow one to iterate available "disk systems". In another words,
> >> BPartition::GetNextSupportedType() called on a BDiskDevice should return
> >> stuff like "Intel Partition Map", "Amiga Disk System", "Apple Disk
> >> System", "GPT" (or whatever that's called, I mean the new EFI stuff).
> >> But it doesn't return anything for empty disks, since the object
> >> hierarchy is not fully constructed in this case.
> > 
> > In fact this is not at all a kernel problem. One could even argue whether
> > this is a bug at all. BPartition::GetNextSupportedType() is almost
> > equivalent to calling BPartition::GetNextSupportedChildType() on the 
> > parent
> > partition. Basically the parent partitioning system is asked what child
> > partition types are acceptable. Without a parent partition there's
> > obviously no such restriction. Note, that the types returned by this 
> > method
> > are just generally acceptable types, it doesn't necessarily mean that
> > initializing is supported for all of them. One has to explicitly check 
> > with
> > BPartition::CanInitialize() to make sure. That's also how to get the
> > potential disk system types for disk device -- just iterate through all
> > disk systems and filter via BPartition::CanInitialize().
> 
> Well, if that's how it's supposed to work, I can just change DriveSetup
> to try this method.

Well, it's our API. It's experimental. We can change it. 
BPartition::GetNextSupportedType() could just as well return all disk 
systems when the partition in question is a disk device (could be made 
virtual with BDiskDevice overriding it).

CU, Ingo

Other related posts: