Re: BDiskSystem::Supports*()/Validate*()

"Axel Dörfler" <[email protected]>
Newsgroups gmane.os.openbeos.storage
Message-ID <13594344943-BeMail@nichtsnutz>
"Ingo Weinhold" <bonefish-CFLBMwTPW48UNGrzBIF7/[email protected]> wrote:
> Anyway, I've been mulling over the question whether e.g. the pieces 
> of 
> information the BDiskSystem::SupportsResizing[Child]() methods return 
> are actually useful for the API user. And I came to the conclusion, 
> that they are indeed. E.g. if you have a primary or logical intel 
> partition -- for which resizing will be implemented in the not so 
> distant future -- being formatted with BFS -- which doesn't support 
> resizing -- DriveSetup should nevertheless offer you the option to 
> resize the partition. Warning you, of course, that it will destroy 
> the 
> data on the partition.

If you enlarge an existing partition, BFS won't even notice it (it will 
still operate properly but ignore the extra space).

> So BPartition::Resize() needs something like a `bool force' 
> parameter, 
> indicating, that it shall not fail, when resizing the content fails; 
> or 
> maybe better `bool resizeContents' specifying whether or not to 
> resize 
> the contents. At any rate that would make the semantics of 
> CanResize() 
> a bit confusing, I think (since it will just return false, although 
> calling Resize() is possible). Another parameter might be useful:
> 
>   bool CanResize(bool *canResizeContents, bool *whileMounted = NULL);

I am not sure if I like that way of method calling, even if I might be 
a bit late :)
I think it's strange that a CanResize() call needs and changes boolean 
values.
I would understand a:
enum resize_capabilities {
	B_CAN_RESIZE_ITSELF = 1,
	B_CAN_RESIZE_CONTENTS = 2,
	B_RESIZE_WHILE_MOUNTED = 4
};
and:
bool CanResize();
resize_capabilities ResizeCapabilities();

better (or something to that extend). The functionality itself looks 
good, though :)

>   bool CanMove(bool *canMoveContents, bool *whileMounted = NULL);

same as above.

(just my opinion)

Adios...
   Axel.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.