[PATCH] sensors-detect and udev

Jean Delvare khali at linux-fr.org
Wed Aug 11 20:36:51 CEST 2004


> sensors-detect currently checks at the beginning of its execution if
> the i2c device nodes exists. It can't work on a system using udev as
> the nodes are created when the i2c-dev module is inserted.
> 
> The attached patch fixes that.

I don't get this:

+  if (-d './dev') {

How does the existence of a directory named "dev" in the current
directory (which can be just anything) demonstrate the use of udev?

And could you please explain how udev is working? I don't know anything
about it.

Also,

+  if ((!$use_devfs) and (!$use_udev)) {

Please use "&&" instead of "and". Also notice that !(A && B) is more
efficient than (!A) && (!B), but I admit I am splitting hairs here ;)

Thanks.

-- 
Jean "Khali" Delvare
http://khali.linux-fr.org/



More information about the lm-sensors mailing list