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

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 23 Apr 2008 15:13:17 +0200 CEST

Marco Minutoli <mminutoli@xxxxxxxxx> wrote:
> 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?

Well, the above might currently look like:
$ mkfs -t bfs -o "block_size 2048" /name/of/my/device 
ThisIsMyVolumeName

As I said, we would need to define common settings in order to be able 
to do something like you propose. Most file systems won't need any 
special settings, though, I guess, so at least I would be fine whatever 
way you go.
For example, you could specify "block_size" as a built-in setting of 
mkfs, that it will then translate to a driver settings string, 
concatenates whatever the user specified there, and then send that one 
to the file system. If you do so, we need to put that into our 
documentation, though (if a file system supports something like a block 
size, it should be set using the parameter "block_size").
We could also add a method to the add-ons that return a help string 
explaining all options.

BTW I would not hide the volume name behind an option; in Haiku, file 
systems are usually identified that way.

Bye,
   Axel.


Other related posts: