Skip to contentSkip to conversation

try to run MAKEDEV if i2c-dev device files are

lm-sensors Jean Delvare 2 participants 3 messages Jul 7, 2007 – Jul 8, 2007

lore
Share & tools
lore
#0 lore raw
Quoted 14 lines
      Author: jwrdegoede
        Date: Fri Jul  6 21:39:39 2007

New Revision: 4571
Changeset: http://lm-sensors.org/changeset/4571

Modified:
lm-sensors/trunk/prog/detect/sensors-detect

Log:
try to run MAKEDEV if i2c-dev device files are missing before aborting (adapted fedora patch)

lm-sensors/trunk/prog/detect/sensors-detect (revision 4571) line 2183

Quoted 9 lines
lm-sensors/trunk/prog/detect/sensors-detect (revision 4571) renamed from lm-sensors/trunk/prog/detect/sensors-detect (revision 4568) +3 -0
@@ -2175,6 +2175,9 @@
   }
 
   if (!($use_devfs || $use_udev)) {
+    if (! -c '/dev/i2c-0' && -x '/sbin/MAKEDEV') {
+      system("/sbin/MAKEDEV i2c");
+    }
     if (-c '/dev/i2c-0') {
       $dev_i2c = '/dev/i2c-';
     } else { # default

Another good catch, and maybe we can improve it a bit.

First of all, a question: how many i2c device nodes does your MAKEDEV create? The one I have in Slackware 9.1 only creates i2c-0 and i2c-1. This might not be sufficient. Not our fault though.

Secondly, MAKEDEV was in /dev on Slackware, so maybe we could test both locations?

Then, the good news is that we should be able to drop the reference to prog/mkdev/mkdev.sh, and finally delete it from the lm-sensors package (in branch 3.0.0). I don't plan to move it to i2c-tools. On new systems it's not needed. On old systems, MAKEDEV should do the work.

Thanks,

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw

Re: [lm-sensors] try to run MAKEDEV if i2c-dev device files

Quoted 26 lines · Jean Delvare
Quoted 14 lines
      Author: jwrdegoede
        Date: Fri Jul  6 21:39:39 2007

New Revision: 4571
Changeset: http://lm-sensors.org/changeset/4571

Modified:
lm-sensors/trunk/prog/detect/sensors-detect

Log:
try to run MAKEDEV if i2c-dev device files are missing before aborting (adapted fedora patch)

lm-sensors/trunk/prog/detect/sensors-detect (revision 4571) line 2183

Quoted 9 lines
lm-sensors/trunk/prog/detect/sensors-detect (revision 4571) renamed from lm-sensors/trunk/prog/detect/sensors-detect (revision 4568) +3 -0
@@ -2175,6 +2175,9 @@
   }
 
   if (!($use_devfs || $use_udev)) {
+    if (! -c '/dev/i2c-0' && -x '/sbin/MAKEDEV') {
+      system("/sbin/MAKEDEV i2c");
+    }
     if (-c '/dev/i2c-0') {
       $dev_i2c = '/dev/i2c-';
     } else { # default

Another good catch, and maybe we can improve it a bit.

Quoted 4 lines

First of all, a question: how many i2c device nodes does your MAKEDEV create? The one I have in Slackware 9.1 only creates i2c-0 and i2c-1. This might not be sufficient. Not our fault though.

Mine version create i2c-0 - i2c-7

Quoted 3 lines

Secondly, MAKEDEV was in /dev on Slackware, so maybe we could test both locations?

I had laready thought about that, as it used to be in /dev with Fedora / RH once too, but that was a long time ago. I thought al distro's would have fixed that by now.

I'll add checking for and running of /dev/MAKEDEV to svn in a couple of minutes.

Quoted 4 lines

Then, the good news is that we should be able to drop the reference to prog/mkdev/mkdev.sh, and finally delete it from the lm-sensors package (in branch 3.0.0). I don't plan to move it to i2c-tools. On new systems it's not needed. On old systems, MAKEDEV should do the work.

Agreed.

Regards,

Hans

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#2 lore raw
In reply to Jean Delvare

Hi Hans,

Quoted 6 lines · Hans de Goede
Quoted 3 lines · Jean Delvare

First of all, a question: how many i2c device nodes does your MAKEDEV create? The one I have in Slackware 9.1 only creates i2c-0 and i2c-1. This might not be sufficient. Not our fault though.

Mine version create i2c-0 - i2c-7

Much more reasonable.

Quoted 8 lines
Quoted 2 lines

Secondly, MAKEDEV was in /dev on Slackware, so maybe we could test both locations?

I had laready thought about that, as it used to be in /dev with Fedora / RH once too, but that was a long time ago. I thought al distro's would have fixed that by now.

I'll add checking for and running of /dev/MAKEDEV to svn in a couple of minutes.

Good, thanks.

Quoted 4 lines
Quoted 4 lines

Then, the good news is that we should be able to drop the reference to prog/mkdev/mkdev.sh, and finally delete it from the lm-sensors package (in branch 3.0.0). I don't plan to move it to i2c-tools. On new systems it's not needed. On old systems, MAKEDEV should do the work.

I've done that now.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors