[haiku-development] Re: Format of the initialization parameter string, BFSAddOn

  • From: Marco Minutoli <mminutoli@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 23 Apr 2008 14:06:21 +0200

On Wed, 23 Apr 2008 11:43:40 +0200 CEST
"Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx> wrote:

> 
> > Looking at the BFSAddOn interface I noticed that the Initialize 
> > method
> > take a string that should contain initialization parameters and I 
> > have
> > a couple of questions about this.
> > 
> > How should this string be formatted?
> 
> It's a driver settings string in flat format.
> It could look like this:
> "key1 = value; key2 = value"
> or:
> "key1 value; key2 value"
> or:
> "key1 = value { key2 = value; key3 = value }"
> 
> Depending on if the settings are nested or not. For a file system,
> they probably aren't ever nested, though.
> 
Ok thanks.

> > Where can I find an exhaustive list of possible options?
> 
> You don't have to. You will just get this string from the command
> line, and pass it over to the initialize function unchanged.
> Every file system will have different options, so you cannot make any 
> assumptions on what the file system needs here. While we could try to 
> specify some generic options that all file systems may want to
> support (if applicable), we haven't done so yet.
> 

This is a bit different of what I had in mind because the end user,in
this way, have to be aware of the driver settings string syntax. My
original idea was to implement something similar to the mkfs on linux,
syntactically speaking.

Just to make an example:

$ mkfs -t bfs -b 2048 -V ThisIsMyVolumeName /name/of/my/device

But is this the haiku way of doing things?

What do you have in mind instead?

Cheers,
Marco

Other related posts: