[haiku-development] Re: Some questions

  • From: "Ryan Leavengood" <leavengood@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 30 Apr 2008 10:53:40 -0400

On Wed, Apr 30, 2008 at 9:57 AM, Fredrik Modéen <fredrik@xxxxxxxxx> wrote:
>
>  So what was the verdict of my svn access? Was there a decision? :)

As far as I know you were approved. What is your berlios.de username?

>  How would new code into Haiku be handled? I have the source code for
>  PCI-gameport driver  (http://www.bebits.com/app/2017) and the author
>  Alexander Coers gave me his blessing.  I have change it so it will fit in
>  with Haiku source code rules, but where and how should I send it? As a
>  zip, as a patch? If a patch where would things like this be located in the
>  source?

I would suggest waiting until you have svn access, then commit it
yourself. As for location, it should go somewhere in the driver
hierarchy (under src/add-ons/kernel/drivers/). Just be sure to fix the
code to match our guidelines.

>  With Joystick pref app I have some problem that I don't know how to best
>  handle. I need a good way to look on a file and determent if the file is a
>  file or a link to a file. If it's a link I need to get the name of the
>  file where it's linked to.

Something like this (warning, untested code, missing a lot of error checks!)

BPath path("/the/path/in/question");
BEntry entry(path.Path());
if (entry.IsSymLink()) {
  BSymLink symLink(entry);
  BDirectory parent;
  entry.GetParent(&parent);
  symLink.MakeLinkedPath(&parent, &path);
}
// path should be a file
BFile theOneTrueFile(path.Path());


Regards,
Ryan

Other related posts: