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

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 05 May 2008 21:13:59 +0200 CEST

Marco Minutoli <mminutoli@xxxxxxxxx> wrote:
> the attached patch add a dir under /src/bin with the code of mkfs.

Thanks! I only had a brief look, and you should have a closer look at 
our coding style guide:
* member variables get an 'f' prefix, like fType (instead of fsType), 
or fVolumeName (instead of volName). We also prefer descriptive names 
(ie. volume instead of vol).
* FsCreator.h has no header guards
* includes should be divided in sections, and ordered alphabetically 
(first the local class, then POSIX, then public, then private, then 
other local), for example:

#include "FsCreator.h"

#include <iostream>
#include <stdio.h>

#include <DiskSystem.h>
...

* there is always a space between operators ("opt ? 0 : 1", not "opt? 0 
: 1")
* there is always a space after a comment (when it's not last in a 
line)
* there are always two blank lines between functions
* copyright should be 2008, not 2004-2008 - or are you already working 
on this code since 2004? :-)
* you sometimes mix "type* name", and "type *name" - you should 
consistently use one of them

> The utility is actually *not* working. I am just sending it for a 
> code
> review.
> 
> The syntax is simple:
> 
> $ mkfs -t bfs -o <option string> <device name> <VolumeName>
> 
> At the moment the utility gets stuck with some error in the 
> terminal[1].
> I haven't figured out what they mean and who is sending them yet (any
> help would be very appreciated :D).

That doesn't look like an error message, but rather some debug output 
about which add-ons were loaded.
If the CPU usage is any indication in this screenshot, it might be 
running in an endless loop?

Bye,
   Axel.


Other related posts: