diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-04-03 08:10:45 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-04-03 08:10:45 +0200 |
commit | ef81710c7b9b7a8b0497f4d9b5750e23c48cdcd6 (patch) | |
tree | 80fc7feebf77913ed29f8e6dbf8c514d0eaf0f9c /util/oem_hp.c | |
parent | de403b575d6475cc4789049c50dbe44effff71d4 (diff) | |
parent | e3a9bfc89256e939ab1c1f56f6961b6ee15aa84a (diff) |
Merge tag 'upstream/3.0.3'
Upstream version 3.0.3
Diffstat (limited to 'util/oem_hp.c')
-rw-r--r-- | util/oem_hp.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/util/oem_hp.c b/util/oem_hp.c index 4c5b4f9..b7f7d07 100644 --- a/util/oem_hp.c +++ b/util/oem_hp.c @@ -83,10 +83,17 @@ int decode_sensor_hp(uchar *sdr,uchar *reading,char *pstring, int slen) strncpy(pstring,"na",slen); /*oem*/ rv = 0; } else { - if ((reading[2] & 0x40) == 0x40) { /*Init/Unavail state*/ - strncpy(pstring,"Init",slen); +#ifdef OLD + int vend, prod; + get_mfgid(&vend,&prod); + /* This was an anomaly for an older HP DL380 but is no longer valid */ + if ((prod == 0x2000) && ((reading[2] & 0x40) == 0x40)) { + /*custom Init/Unavail state if DL380*/ + strncpy(pstring,"Init",slen); rv = 0; - } else if (evtype == 0x6f) { /*evtype==0x6f special*/ + } else +#endif + if (evtype == 0x6f) { /*evtype==0x6f special*/ pstr = "DiscreteEvt"; if (stype == 0x08) { /*Power Supply presence*/ if (reading[2] & 0x01) pstr = "Present"; |