|
@ -1612,8 +1612,11 @@ Jean Delvare, Trent Piepho and others'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
my $dimm_count = 0; |
|
|
my $dimm_count = 0; |
|
|
|
|
|
|
|
|
|
|
|
sub get_dimm_list |
|
|
|
|
|
{ |
|
|
my $dir; |
|
|
my $dir; |
|
|
if (!$use_hexdump) { |
|
|
|
|
|
|
|
|
|
|
|
if ($use_sysfs) { |
|
|
if ($use_sysfs) { |
|
|
$dir = '/sys/bus/i2c/drivers/eeprom'; |
|
|
$dir = '/sys/bus/i2c/drivers/eeprom'; |
|
|
} else { |
|
|
} else { |
|
@ -1621,13 +1624,15 @@ if (!$use_hexdump) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (-d $dir) { |
|
|
if (-d $dir) { |
|
|
@dimm_list = split(/\s+/, `ls $dir`); |
|
|
|
|
|
|
|
|
return split(/\s+/, `ls $dir`); |
|
|
} elsif (! -d '/sys/module/eeprom') { |
|
|
} elsif (! -d '/sys/module/eeprom') { |
|
|
print "No EEPROM found, are you sure the eeprom module is loaded?\n"; |
|
|
print "No EEPROM found, are you sure the eeprom module is loaded?\n"; |
|
|
exit; |
|
|
exit; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@dimm_list = get_dimm_list() unless $use_hexdump; |
|
|
|
|
|
|
|
|
for my $i (0 .. $#dimm_list) { |
|
|
for my $i (0 .. $#dimm_list) { |
|
|
$_ = $dimm_list[$i]; |
|
|
$_ = $dimm_list[$i]; |
|
|
if (($use_sysfs && /^\d+-\d+$/) |
|
|
if (($use_sysfs && /^\d+-\d+$/) |
|
|