[PATCH] FreeBSD backend

Joe Marcus Clarke marcus at FreeBSD.org
Mon Nov 6 10:14:20 PST 2006


On Mon, 2006-11-06 at 13:01 -0500, David Zeuthen wrote:
> On Sun, 2006-11-05 at 17:01 -0500, Joe Marcus Clarke wrote:
> > Not to steal Artem's thunder, but I have completed initial work on
> > merging our HAL patches with HAL git.  In the same vein, I have included
> > a diff with all of the "global" code changes.  A link to the full patch
> > is also attached.
> > 
> > Last time Jean-Yves Lefort submitted a "global" code patch, he was told
> > to separate it into individual patch files.  I am hoping that simply
> > describing what each patch file in this one consolidate patch does will
> > be sufficient.
> 
> Thanks for working on this. Some comments inline after briefly looking
> at the patch... I'll look more at it later..
> 
> > hald-runner/main.c : Add PATH elements needed for FreeBSD (patch by
> > Jean-Yves Lefort <jylefort at FreeBSD.org>)
> 
> hald-runner/main.c: 
> -	tmpstr = g_strdup_printf("PATH=/sbin:/usr/sbin:/bin:/usr/bin:%s", getenv("PATH"));
> +	tmpstr = g_strdup_printf("PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/X11R6/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:%s", getenv("PATH"));
> 
> Any reason in particular you need all these paths? I think /usr/local
> might make sense but I'm not sure why /usr/X11R6/* would be ever needed.
> It's not like you'll have an X connection or helpers (callouts, method
> calls etc.) should ever need to communicate with X.

That's just the way FreeBSD is at the moment.  We're trying to collapse
into one PREFIX (/usr/local), but for now, we have stuff spread out over
both.  If you don't want this to be committed to HAL git, then it will
become a local patch of ours.

> 
> > fdi/policy/10osvendor/20-storage-methods.fdi : Add support for FreeBSD
> > mount options (is this the best place to add these?)
> 
> I think so, yes. Though the actual program doing the mounting, such as
> gnome-mount, needs to be updated to use the right mount options.

Yes, we do that locally.

> 
> Though.. right now gnome-mount just allows the user to enter the mount
> options in a text box... at some point we'll add nicer UI that will be
> constructed based on the contents of valid_mount_options... the we need
> some code to properly interpret each mount option. But that shouldn't be
> hard.
> 
> > hald/hald.c : Add a new function, osspec_privileged_init, that is called
> > before hald drops privileges.  This is needed for FreeBSD to be able to
> > fully probe hardware (patch by Jean-Yves Lefort <jylefort at FreeBSD.org>)
> 
> Oh, ok, this is for things like opening device files for receiving
> events from the kernel? I guess that makes sense, yeah, it's just not
> something we've been using on Linux...

Actually, receiving kernel events can be done without root.  We need
this for opening /dev/pci, /dev/usb*, etc. Without this, HAL would not
have nearly the same kind of detail that it does on FreeBSD.  This is a
lynch pin patch for us.

Joe

-- 
Joe Marcus Clarke
FreeBSD GNOME Team      ::      gnome at FreeBSD.org
FreeNode / #freebsd-gnome
http://www.FreeBSD.org/gnome
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/hal/attachments/20061106/0ded63d2/attachment.pgp


More information about the hal mailing list