2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-28 21:07:55 +00:00

27 Commits

Author SHA1 Message Date
Jean Delvare
8fb3922219 isadump: Fix compilation under musl
From Brendan Heading:

You may be aware of the musl C-library implementation, which tries to
be strictly standards compliant, avoids non-standard extensions, etc.
Some distributions have adopted it as their standard C library, in
others (such as buildroot) it is a configuration alternative.

Vanilla lm-sensors does not compile under musl, due to the following
excerpt which appears in four different places. The code is checking
that the glibc version is greater than 2.0.

#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0
#include <sys/io.h>
#else
#include <asm/io.h>
#endif

This fails under musl does not define __GLIBC__ (in fact, by design,
it doesn't provide any way to identify itself at all) - which causes
it to try to include <asm/io.h> rather than <sys/io.h>.

It's a long time since glibc 2.0.1 was released - 1997. Accordingly,
it seems to make little sense at this stage to try to retain
compatibility with very old libcs - so maybe it should be removed
entirely.
2015-08-31 07:34:51 +00:00
Jean Delvare
eb5cf8b2ec Update my e-mail address and copyright years 2014-03-20 10:23:35 +00:00
Jean Delvare
9b3e34e470 isadump: Add support for word (16-bit) and long (32-bit) reads
Sometimes the hardware expects 16-bit or 32-bit reads rather than byte
reads. Add support to isadump so that the user can ask for such reads.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5961 7894878c-1315-0410-8ee3-d5d059ff63e0
2011-04-15 08:26:49 +00:00
Jean Delvare
3e78f8323b Use geteuid instead of getuid so that setuid bit works.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5709 7894878c-1315-0410-8ee3-d5d059ff63e0
2009-04-19 07:16:40 +00:00
Jean Delvare
f2e518511d Patch from Aurelien Jarno:
I have just noticed that the FSF address is the old one in all files
except COPYING. Please find a patch below to fix that.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5163 7894878c-1315-0410-8ee3-d5d059ff63e0
2008-03-26 13:37:12 +00:00
Jean Delvare
855b1aa6ef The lm-sensors team has no legal existence and thus can't hold a copyright.
I tried to assign the copyright back to the original author where possible.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4900 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-09-29 19:08:30 +00:00
Jean Delvare
b79274babd Add some more warning flags, and fix these warnings.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4545 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-07-03 16:03:22 +00:00
Jean Delvare
9f98b33019 Fix busy flag detection. Some Super-I/O chips (W83627THF) can't read
back from the address port, so the value 0xff is returned, causing
a false positive with the original test. Testing explicitly for 0x80
instead of only testing that bit 7 is set, works around it.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4406 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-05-16 09:11:37 +00:00
Mark M. Hoffman
c5ffa7b635 Merge from trunk (4303:4355) out to 3.0.0 branch.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4357 7894878c-1315-0410-8ee3-d5d059ff63e0
2007-04-03 12:55:30 +00:00
Jean Delvare
8afee51d60 prog/dump/*: More robust user input handling.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4256 7894878c-1315-0410-8ee3-d5d059ff63e0
2006-12-09 19:20:00 +00:00
Jean Delvare
e5d21141d6 Increase max bank (or logical device) number from 15 to 31, as 20 was seen
in some chips (PC87427.)


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4151 7894878c-1315-0410-8ee3-d5d059ff63e0
2006-09-06 15:51:26 +00:00
Jean Delvare
4c211d81d9 prog/dump/*.c, prog/detect/*.c: Handle possible error in fgets().
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4080 7894878c-1315-0410-8ee3-d5d059ff63e0
2006-08-01 09:46:50 +00:00
Jean Delvare
eabdfe8b94 Display the real addresses (rather than offsets thereto) in flat
mode.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3111 7894878c-1315-0410-8ee3-d5d059ff63e0
2005-09-30 17:30:55 +00:00
Jean Delvare
4943663301 Handle keys/passwords needed to access most Super-I/O chips.
This should let us dump Winbond Super-I/O chips past the few first
dozens registers.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2899 7894878c-1315-0410-8ee3-d5d059ff63e0
2005-02-09 21:08:17 +00:00
Jean Delvare
89deecca35 Wait for user input to continue (as opposed to 5 sec delay).
Can be skipped using -y.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2663 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-08-16 18:55:39 +00:00
Jean Delvare
e7f4222ccb Mass coding-style update.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2661 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-08-15 12:23:14 +00:00
Jean Delvare
ad91c909d8 Add bank support to flat address space mode.
Default to bank register 0x07 for Super-I/O chips.
        Move default bank register selection to a separate function.
        Move setting/restoring bank to a separate function.
        Allow dumping of shorter ranges (flat address space mode).
        Limit I2C-like dumps to addresses up to 0x3fff.
        Print expected ranges on range errors.

        This should allow us to work with the PC87360 family of chips.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2475 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-25 13:26:45 +00:00
Jean Delvare
0c01cd9544 Stop being Winbond-specific about banks: don't mask high bit.
Allow forcing of bank 0. Restore bank after dump.
        This allows proper operation on Super-I/O chips.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2452 7894878c-1315-0410-8ee3-d5d059ff63e0
2004-04-19 18:02:10 +00:00
Jean Delvare
9f5e11adc7 Fix compiler warning (missing include).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1792 7894878c-1315-0410-8ee3-d5d059ff63e0
2003-06-16 17:22:22 +00:00
Mark D. Studebaker
b0892c62e4 add flat address space support (isadump -f 0x6000) so we can
get dumps of chips like the via686a.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1200 7894878c-1315-0410-8ee3-d5d059ff63e0
2001-10-13 16:37:16 +00:00
Mark D. Studebaker
96a5ce9a4f Patch from Oleg Vdovikin to make alpha compiles happy.
Replaced sys/perm.h with sys/io.h. But then it conflicted
      with asm/io.h so I changed it to only use one or the other.
      Hope it works.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1107 7894878c-1315-0410-8ee3-d5d059ff63e0
2001-06-02 03:31:58 +00:00
Mark D. Studebaker
a2aaaa6608 (mds) added Winbond-style bank selection.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@798 7894878c-1315-0410-8ee3-d5d059ff63e0
2000-05-06 17:49:53 +00:00
Frodo Looijaard
2212822342 ISA changes
* i2c-isa simplified, by using the addr field in the client structure,
  instead of a new field. This means we do not need `struct isa_*'
  anymore
* All clients changed to reflect the new isa code. Many are much
  simplified now.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@505 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-07-21 22:04:34 +00:00
Frodo Looijaard
c2549b34ca Changed hydra stuff from DOS to UNIX fileformat. Fixed bug in isadump.
Thanks, Geert.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@434 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-04-30 12:30:04 +00:00
Frodo Looijaard
1ade24f919 Geert's PPC support and Hydra driver
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@430 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-04-28 18:18:12 +00:00
Frodo Looijaard
33269d5252 Small fixes to make all programs compile cleanly with libc6.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@168 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-14 00:41:44 +00:00
Frodo Looijaard
dfc74d0f39 ISA utility to dump address/register type adderss spaces.
Usage: isadump <ADDR-REG> <DATA-REG>
For the default LM78, this would be `isadump 0x295 0x296' (addresses may be
specified as decimal, octal or hexadecimal).


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@144 7894878c-1315-0410-8ee3-d5d059ff63e0
1999-01-01 00:41:46 +00:00