Go to the FreeLists Home Page Home Signup Help Login
 



[openbeosstorage] || [Date Prev] [06-2003 Date Index] [Date Next] || [Thread Prev] [06-2003 Thread Index] [Thread Next]

[openbeosstorage] Re: My Usual Confusion

  • From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
  • To: openbeosstorage@xxxxxxxxxxxxx
  • Date: Thu, 19 Jun 2003 12:13:59 +0200 (MEST)
On Thu, 19 Jun 2003, Tyler Dauwalder wrote:

[...]
> > 2) Why not introduce a BPartition::SetType(), that tells the
> > partitioning system to set the type of the partition? Or maybe rather
> > add a boolean parameter to Initialize() indicating whether to only set
> > the partition type or to also let the supplied disk system format its
> > contents?
>
> I think I like the SetType() way better. Initialize(bool) would leave
> me feeling slightly uneasy that perhaps I got the boolean value
> incorrect when I only wanted to change the partition type.

Though, if we aim to enforce consistency between partition type and
partition content, setting the type should actually not be allowed. Mmh,
maybe introducing a SetType() (or a boolean flag for Initialize()) might
not be such a good idea. Perhaps the standard Initialize() plus a
CreateChild() taking a partition type is fine for the userland API. The
partition module needs to offer functionality for setting the partition
type in any case, though.

Due to getting rid of ContentType(), what can happen, if we provide a
SetType() is, that, if you e.g. invoke SetType("FAT 32 Filesystem") on a
BFS formatted partition, the Type() will afterwards still be the same.

Mmh, maybe, the Type()+ContentType() approach is not that bad after all?!
Consistency between the two could still be enforced on initialization, but
we can also have a SetType() that doesn't confuse the user. IIRC the only
argument against representing both types was, that we'll often have
reduncancy. Which I could easily live with...

CU, Ingo





[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.