slackbuilds_ponce/system/i2c-tools/patches/changeset_r6063.diff

42 lines
1.5 KiB
Diff

Index: /i2c-tools/branches/i2c-tools-3.1/eeprom/decode-dimms
===================================================================
--- /branches/i2c-tools-3.1/eeprom/decode-dimms (revision 6043)
+++ /branches/i2c-tools-3.1/eeprom/decode-dimms (revision 6063)
@@ -1740,5 +1740,5 @@
sub get_dimm_list
{
- my (@dirs, $dir, $file, @files);
+ my (@dirs, $dir, $opened, $file, @files);
if ($use_sysfs) {
@@ -1750,4 +1750,5 @@
foreach $dir (@dirs) {
next unless opendir(local *DIR, $dir);
+ $opened++;
while (defined($file = readdir(DIR))) {
if ($use_sysfs) {
@@ -1770,10 +1771,10 @@
}
- if (@files) {
- return sort { $a->{file} cmp $b->{file} } @files;
- } elsif (! -d '/sys/module/eeprom') {
- print "No EEPROM found, are you sure the eeprom module is loaded?\n";
+ if (!$opened) {
+ print STDERR "No EEPROM found, try loading the eeprom or at24 module\n";
exit;
}
+
+ return sort { $a->{file} cmp $b->{file} } @files;
}
Index: /i2c-tools/branches/i2c-tools-3.1/CHANGES
===================================================================
--- /branches/i2c-tools-3.1/CHANGES (revision 6048)
+++ /branches/i2c-tools-3.1/CHANGES (revision 6063)
@@ -5,4 +5,5 @@
decode-dimms: Decode module configuration type of DDR2 SDRAM
Decode bus width extension of DDR3 SDRAM
+ Don't choke when no EEPROM is found
i2c-dev.h: Minimize differences with kernel flavor
Move SMBus helper functions to include/i2c/smbus.h