On 23/04/2008, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote: > 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. That's what I suggested Marco in the first place. There could be the utility Help function that gets displayed with the following mkfs --help which would simply says that in order to gets the specifics file system help all he has to do is mkfs -t befs --help mkfs -t vfat --help Then the utility calls the related ::Help() addon functions. As Marco pointed out though, this method would be used only by the CLI, and not by DriverSetup for example. > Bye, > > Axel. > Regards, -- Salvatore Benedetto (a.k.a. emitrax) Student of Computer Engineer University of Pisa www.haiku-os.it