All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sensors-detect and udev
@ 2005-05-19  6:25 Aurelien Jarno
  2005-05-19  6:25 ` Greg KH
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Aurelien Jarno @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

Hi all!

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.

Bye,
Aurelien

-- 
  .''`.  Aurelien Jarno	              GPG: 1024D/F1BCDB73
 : :' :  Debian GNU/Linux developer | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net
-------------- next part --------------
Index: prog/detect/sensors-detect
=================================RCS file: /home/cvs/lm_sensors2/prog/detect/sensors-detect,v
retrieving revision 1.338
diff -u -1 -b -p -r1.338 sensors-detect
--- prog/detect/sensors-detect	31 Jul 2004 16:09:37 -0000	1.338
+++ prog/detect/sensors-detect	10 Aug 2004 23:10:18 -0000
@@ -1805,2 +1805,8 @@ sub initialize_conf
 
+  my $use_udev = 0;
+  if (-d './dev') {
+    $use_udev = 1;
+    $dev_i2c = '/dev/i2c-';
+  } 
+
   if (-f '/etc/modules.conf') {
@@ -1813,3 +1819,3 @@ sub initialize_conf
 
-  if (!$use_devfs) {
+  if ((!$use_devfs) and (!$use_udev)) {
     if (-c '/dev/i2c-0') {

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

end of thread, other threads:[~2005-05-19  6:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19  6:25 [PATCH] sensors-detect and udev Aurelien Jarno
2005-05-19  6:25 ` Greg KH
2005-05-19  6:25 ` Greg KH
2005-05-19  6:25 ` Jean Delvare
2005-05-19  6:25 ` Aurelien Jarno
2005-05-19  6:25 ` Greg KH
2005-05-19  6:25 ` Jean Delvare
2005-05-19  6:25 ` Aurelien Jarno
2005-05-19  6:25 ` Mark M. Hoffman
2005-05-19  6:25 ` Aurelien Jarno
2005-05-19  6:25 ` Jean Delvare
2005-05-19  6:25 ` Jean Delvare
2005-05-19  6:25 ` Jean Delvare

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.