All of lore.kernel.org
 help / color / mirror / Atom feed
* Missing udev rules
@ 2017-03-28 13:31 Jonas Bonn
  2017-03-28 15:27 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Jonas Bonn @ 2017-03-28 13:31 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

Hi,

I've been poking at the udevng/udev modules a bit recently.  There are 
many places where references are made to settings that come from udev 
but for which are there are no corresponding udev rules anywhere in the 
source code tree.

i)  Almost all the setup_*() functions reference device node labels but 
there are almost no rules that set these labels anywhere.
ii)  There are references to some environment variables from udev that 
aren't set in ofono rules.

Not knowing whether these rules actually exist in the wild means that 
it's difficult to just clean this up.  Unfortunately,
I suspect that most of the device labelling rules are non-existant and 
that the code looks like it does because these functions get 
cut-and-pasted everytime support for a new device is added.

I think, as a general matter of policy, that any reference to a setting 
from udev needs to be accompanied by a rule that makes the setting.  If 
there's no rule, we can assume it's unused and make the according cleanups.

Thoughts?

/Jonas

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Missing udev rules
  2017-03-28 13:31 Missing udev rules Jonas Bonn
@ 2017-03-28 15:27 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2017-03-28 15:27 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]

Hi Jonas,

On 03/28/2017 08:31 AM, Jonas Bonn wrote:
> Hi,
>
> I've been poking at the udevng/udev modules a bit recently.  There are
> many places where references are made to settings that come from udev
> but for which are there are no corresponding udev rules anywhere in the
> source code tree.
>
> i)  Almost all the setup_*() functions reference device node labels but
> there are almost no rules that set these labels anywhere.
> ii)  There are references to some environment variables from udev that
> aren't set in ofono rules.

These are highly platform specific.  Some we have attempted to document 
inside doc/ (e.g. see calypso-modem.txt, sim900-modem.txt, etc)  while 
for others you just need to look at how the modem driver works (e.g. ifx.c).

>
> Not knowing whether these rules actually exist in the wild means that
> it's difficult to just clean this up.  Unfortunately,
> I suspect that most of the device labelling rules are non-existant and
> that the code looks like it does because these functions get
> cut-and-pasted everytime support for a new device is added.
>

No, that's not really true.  However, nobody has touched udev plugin for 
quite some time.  One reason is that there's simply never been any need 
to do so.  Its only used for serial devices and to pass platform 
specific settings on to the modem driver.

> I think, as a general matter of policy, that any reference to a setting
> from udev needs to be accompanied by a rule that makes the setting.  If
> there's no rule, we can assume it's unused and make the according cleanups.
>

I agree with the sentiment, but the reality is different.  It is best if 
we documented these in doc/foo-modem.txt as much as possible.

Regards,
-Denis


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-28 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-28 13:31 Missing udev rules Jonas Bonn
2017-03-28 15:27 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.