Re: [PATCH]: i2c-tools/decode-dimms: fix cryptic error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 15 Jul 2012 19:19:44 +0200, Jean Delvare wrote:
> On Sat, 14 Jul 2012 17:26:26 +0200, Aurelien Jarno wrote:
> > The
> > patch below fixes the issue by outputting an error message in that
> > case.
> > 
> > Index: eeprom/decode-dimms
> > ===================================================================
> > --- eeprom/decode-dimms	(révision 6060)
> > +++ eeprom/decode-dimms	(copie de travail)
> > @@ -1774,6 +1774,9 @@
> >  	} elsif (! -d '/sys/module/eeprom') {
> >  		print "No EEPROM found, are you sure the eeprom module is loaded?\n";
> >  		exit;
> > +	} else {
> > +		print "No EEPROM found, the kernel probably does not support your hardware.\n";
> > +		exit;
> >  	}
> >  }
> 
> The above message is speculation, there can be other reasons (for
> example the system may have no SPD EEPROM at all, or the OS is not
> given access to these.)
> 
> The bug is that function get_dimm_list returns random crap in the
> problematic case (lack of return statement) instead of an empty array
> as it should. I'll take the blame for it as it was introduced by a
> cleanup commit of mine:
>   http://www.lm-sensors.org/changeset/5690
> 
> So IMO the proper fix would rather be:
> (...)

I fixed it slightly differently, see:
http://www.lm-sensors.org/changeset/6062

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux