[PATCH] lshal - The next generation

Jonatan Liljedahl lijon at kymatica.com
Mon Oct 31 16:58:43 PST 2005


On Mon, 31 Oct 2005 16:13:33 +0100
Pierre Ossman <drzeus-list at drzeus.cx> wrote:

> Richard Hughes wrote:
> > On Mon, 2005-10-31 at 15:57 +0100, Pierre Ossman wrote:
> >   
> >> [drzeus at poseidon]$ ./lshal
> >> computer
> >> acpi_PWRF
> >> acpi_C1BE
> >> acpi_C136
> >> acpi_C134
> >> acpi_CPU0
> >> acpi_C11F
> >> computer_alsa_timer
> >>     
> >
> > Just the device names, or the UDI's also?
> >
> >   
> 
> The short output is based on the assumption that most of the UDI is 
> static. The output is:
> 
> strrchr(udi, '/') + 1

There's a problem with that method: sometimes the device name contains
slashes. Example from my box:

/org/freedesktop/Hal/devices/storage_model_SAMSUNG_CD_R/RW_SW_252S

It would be better if you strip the "/org/freedesktop/Hal/devices/"
prefix.

/Jonatan    -=( http://kymatica.com )=-


More information about the hal mailing list