[openbeosstorage] BDiskSystem::Supports*()/Validate*()

  • From: "Ingo Weinhold" <bonefish@xxxxxxxxxxxxxxx>
  • To: "Storage Kit" <openbeosstorage@xxxxxxxxxxxxx>
  • Date: Thu, 17 Jul 2003 01:49:38 +0200 CEST

Howdy,

now that I implemented them all, I really start to wonder, whether most 
of the BDiskSystem::Supports*()/Validate*() are really needed at all. 
Some of them, like SupportsDefragmenting(), are completely equivalent 
to a BPartition method (CanDefragment() in this case). Or say, they are 
even less handy, because one has a redundant parameter that the method 
needs to check (the disk system the method is invoked on must be the 
one the partition is formatted with (or its parent partition for some 
methods)).

Others, like BDiskSystem::SupportsResizing() give different information 
than BPartition::CanResize(). In fact the latter one is the result of 
an AND of BDiskSystem::SupportsResizing() and SupportsResizingChild(). 
The question is: Are the individual pieces of information returned by 
the latter ones of interest or not?

So, what I think about is to
1) drop the BDiskSystem::Validate*() methods entirely,
2) drop the BPartition* parameter of the Supports*() methods -- they 
would return only, if the disk system in principle has the 
capabilities, but not whether it can be done for a certain partition.

So, the only remaining methods with a BPartition* parameters would be 
GetNextSupportedType(), which enumerates possible partition types for 
children of a partition, and IsSubSystemFor(), which tells whether the 
disk system is a subsystem of the system on the supplied partition 
(e.g. the `intel extended partition' system would be a subsystem for a 
`intel partition map' partition).

What do you think?

CU, Ingo


Other related posts: