Look who's a committer now
David Zeuthen
david at fubar.dk
Fri May 12 10:43:27 PDT 2006
On Fri, 2006-05-12 at 13:32 -0400, Joe Marcus Clarke wrote:
> uname -s, or can I just use the uname(3) function?
uname(3) should be fine I suppose.
> > The big wins we get is that 1) we don't need OS-conditionals in the
> > fdi files (we really really don't want that); and 2) we centralize
> > all shared checking in one place.
>
> This I don't follow. The tools stuff, sure, but what about the fdi
> stuff? How does this help the fdi files? Are you saying we create OS
> directories for them as well?
Oh no, my point was that the fdi files would be mostly OS agnostic as
well since e.g. stuff like this
<match key="volume.is_disc" bool="true">
<match key="volume.disc.has_audio" bool="true">
<append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.Volume</append>
<append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Eject</append>
<append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</append>
<append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-system-storage-eject</append>
</match>
<match key="volume.disc.is_blank" bool="true">
<append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.Volume</append>
<append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Eject</append>
<append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</append>
<append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-system-storage-eject</append>
</match>
</match>
will be the same since the script for handling the method is the same
across OS'es. Sure we need a few fixes for stuff like this
<append key="volume.mount.valid_options" type="strlist">shortname=</append>
where we use Linux specific stuff like what mount options are valid
(maybe "shortname=" is a bad example; maybe SELinux specific things like
"context=" is a better example). Anyway, this can be fixed this way:
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
<append key="volume.mount.valid_options" type="strlist">shortname=</append>
</match>
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="FreeBSD">
<append key="volume.mount.valid_options" type="strlist">someFreeBSDOptionForShortName=</append>
</match>
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Solaris">
<append key="volume.mount.valid_options" type="strlist">someSolarisOptionForShortName=</append>
</match>
but my point was that I'd like to minimize that as much as possible. In
the end, higher-level stuff like gnome-mount will deal with that in a
nice way that requires little or no #ifdef's.
David
More information about the hal
mailing list