[systemd-devel] [BUG] too many rfkill services
Lennart Poettering
lennart at poettering.net
Thu Nov 20 15:50:29 PST 2014
On Thu, 20.11.14 11:42, Greg KH (gregkh at linuxfoundation.org) wrote:
> On Thu, Nov 20, 2014 at 03:50:43PM -0300, Cristian RodrÃguez wrote:
> > El 20/11/14 a las 15:40, Lukasz Stelmach escribió:
> >
> > >
> > > $ ls /sys/class/rfkill/
> > > rfkill41 rfkill42
> > > $ systemctl -t device | grep rfkill
> > > sys-devices-pci0000:00-0000:00:1a.0-usb3-3\x2d1-3\x2d1:1.0-bluetooth-hci0-rfkill42.device
> > > sys-devices-pci0000:00-0000:00:1a.7-usb1-1\x2d3-1\x2d3:1.0-ieee80211-phy15-rfkill41.device
> >
> > huh.. so the kernel does not preserve the device number on resume and
> > recreate new ones? Im not sure but that sounds like a kernel bug...
>
> Nope, not a bug, that's how rfkill is designed, it is an incrementing
> number that keeps going up.
>
> Now we can change this, in the kernel, to "recycle" numbers, but you
> will still have the same issue where the numbers could reverse after
> suspend/resume, so you can't rely on the number for anything. You need
> to follow the parent of the device to know what it controls.
Well, we use ID_PATH, but this will not suffice for USB devices that
have two rfkill child devices... How do we get stable identifiers for
those? If the rfkill name is not usable, then we need something else
there...
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list