summaryrefslogtreecommitdiff
path: root/util/oem_hp.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2015-04-29 15:44:44 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2015-04-29 15:44:44 +0200
commitb18f5bf2db0fba2e7e539f68645836036d940d26 (patch)
tree23c4dd8f3d273f34ef9bbe1799d1958685559915 /util/oem_hp.c
parenta7f89980e5b3f4b9a74c70dbc5ffe8aabd28be28 (diff)
Imported Upstream version 2.9.6upstream/2.9.6
Diffstat (limited to 'util/oem_hp.c')
-rw-r--r--util/oem_hp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/util/oem_hp.c b/util/oem_hp.c
index 29a813f..4c5b4f9 100644
--- a/util/oem_hp.c
+++ b/util/oem_hp.c
@@ -86,12 +86,6 @@ int decode_sensor_hp(uchar *sdr,uchar *reading,char *pstring, int slen)
if ((reading[2] & 0x40) == 0x40) { /*Init/Unavail state*/
strncpy(pstring,"Init",slen);
rv = 0;
- } else if ((sdr[20] & 0xC0) == 0xC0) { /*unit1==discrete*/
- b = reading[2] & 0x3f;
- pstr = "DiscreteUnit";
- if (evtype == 0x0b) pstr = redund_str(b);
- snprintf(pstring,slen,"%02x%02x %s",reading[3],reading[2],pstr);
- rv = 0;
} else if (evtype == 0x6f) { /*evtype==0x6f special*/
pstr = "DiscreteEvt";
if (stype == 0x08) { /*Power Supply presence*/
@@ -127,6 +121,12 @@ int decode_sensor_hp(uchar *sdr,uchar *reading,char *pstring, int slen)
else pstr = "Unknown";
snprintf(pstring,slen,"%02x%02x %s",reading[3],reading[2],pstr);
rv = 0;
+ } else if ((sdr[20] & 0xC0) == 0xC0) { /*unit1==discrete*/
+ b = reading[2] & 0x3f;
+ pstr = "DiscreteUnit";
+ if (evtype == 0x0b) pstr = redund_str(b);
+ snprintf(pstring,slen,"%02x%02x %s",reading[3],reading[2],pstr);
+ rv = 0;
}
}
return(rv);