[openbeosstorage] Re: Partitioning rethink

  • From: Tyler Dauwalder <tyler@xxxxxxxxxxxxx>
  • To: openbeosstorage@xxxxxxxxxxxxx
  • Date: Fri, 04 Apr 2003 21:59:45 -0800

> > > > OpenTracker also displays volumes that aren't mountable. Perhaps
> > > > we
> > > > should just have a "mountable" flag=3D3D3D3F In any way, if 
> > > > there
> > > > is no
> > > > file
> > > > system for this partition, it just can't be mountable :))
> > > Is there a reason unmountable volumes are displayed=3D3F
> > 
> > Just for the user, so that he knows "yes, it does recognize the
> > partition (my precious data aren't lost), but it can't mount them,
> > because the system might not know about the file system".
> > Dunno if it really achieves this, since it could also mean "Yes, it
> > sees the partition, but it can't mount it, because all of my 
> > precious
> > data are lost" :-))
> > 
> > If a reason could be added, that would probably be the best way:
> > - "unsupported file system" if no file system could be found
> > - "corrupted data" if the file system check returned 
> > B=3D5FBAD=3D5FDATA -
> >  that
> > should be returned if the partition is recognized as fitting, but
> > some
> > of its parameters are not, i.e. the volume has all BFS magic values,
> > but the block size does not match the real amount, or similar 
> > things.
> 
> BPartition could be extended by a method Status(), which would return
> something like
> B=5FPARTTITION=5F{PARTITIONED,MOUNTED,UNMOUNTED,CORRUPT,UNSUPPORTED=5FDISK=5FSY
> STEM}.

I added:

// partition statuses
enum {
        B_PARTITION_VALID,
        B_PARTITION_CORRUPT,
        B_PARTITION_UNRECOGNIZED,
}

uint32 BPartition::Status() const;

I didn't want to exclude the possibility of mountable partitioning systems, and 
it just didn't seem right including mounting info in the list (though I'm open 
to changing that if you really think it's a good idea). What'd'y'all think?

-Tyler

Other related posts: