On Sat, 14 Jun 2003 14:40:34 +0200 CEST "Axel Dörfler" <axeld@pinc- software.de> wrote: > Tyler Dauwalder <tyler@xxxxxxxxxxxxx> wrote: > > > PS: How about a BPartition::GetDiskSystem(BDiskSystem*)? Then > > > BPartition::ContentType() wouldn't even need to have any strong > > > relationship with the disk system's (pretty) name. > > Having seen the way types would need to laid down using the > > Type()/ContentType() system, I'd actually much rather just go back > > to > > using Type() only (semantically like our current ContentType()) > > than > > do > > this. Though a GetDiskSystem() call could still be useful. > > > > What do you think? :-) > > What about leaving ContentType() to what it is now and change Type() > so > that you can use the partition type in a switch case statement like: > > switch (partition->Type()) { > case BPartition::B_FILE_SYSTEM_TYPE: > ... > break; > case BPartition::B_PARTITION_SYSTEM_TYPE: > ... > break; > } > > ? What your switch statement does can easily be done using BPartition::IsPartitionable(), which (unless I'm mistaken -- I remember, we discussed that) returns whether the partition's disk system is a partitioning system. > BTW is there any way to get to a partition without a disk system > object > at all? If so, GetDiskSystem() would not only be useful, I think. Mmh, maybe I misunderstand you, but a BDiskSystem is not necessary to get a BPartition. The only we to get a BPartition is via BDiskDeviceRoster. I think, GetDiskSystem() is not only useful, but even necessary. Since how, otherwise, would one get the responsible disk system otherwise? The partition's type can't be translated to a disk system name, I believe. CU, Ingo