summaryrefslogtreecommitdiffstats
path: root/system/i2c-tools/patches/changeset_r6063.diff
diff options
context:
space:
mode:
Diffstat (limited to 'system/i2c-tools/patches/changeset_r6063.diff')
-rw-r--r--system/i2c-tools/patches/changeset_r6063.diff42
1 files changed, 42 insertions, 0 deletions
diff --git a/system/i2c-tools/patches/changeset_r6063.diff b/system/i2c-tools/patches/changeset_r6063.diff
new file mode 100644
index 0000000000..59c56d0b33
--- /dev/null
+++ b/system/i2c-tools/patches/changeset_r6063.diff
@@ -0,0 +1,42 @@
+Index: /i2c-tools/branches/i2c-tools-3.1/eeprom/decode-dimms
+===================================================================
+--- /i2c-tools/branches/i2c-tools-3.1/eeprom/decode-dimms (revision 6043)
++++ /i2c-tools/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
+===================================================================
+--- /i2c-tools/branches/i2c-tools-3.1/CHANGES (revision 6048)
++++ /i2c-tools/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