diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-04-14 18:42:54 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-04-14 18:42:54 +0200 |
commit | a8f1f2fbd1fe78c185b5c320c11d0265b49f8668 (patch) | |
tree | 869216c945841ed46e2ca4b69af46f54a738d3cd /util/oem_supermicro.c | |
parent | 42de6cdd540e080b6e34e5e27cb8c44151711010 (diff) | |
parent | c0cffd791bfaffaad631076141fcdfc000adcac1 (diff) |
Merge tag 'upstream/3.0.4'
Upstream version 3.0.4
Diffstat (limited to 'util/oem_supermicro.c')
-rw-r--r-- | util/oem_supermicro.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/util/oem_supermicro.c b/util/oem_supermicro.c index 165bf88..a480b7f 100644 --- a/util/oem_supermicro.c +++ b/util/oem_supermicro.c @@ -68,7 +68,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. void set_loglevel(int level); /*prototype */ extern char fsm_debug; /*mem_if.c*/ -static char * progver = "3.03"; +static char * progver = "3.04"; static char * progname = "ismcoem"; static int verbose = 0; static char fdebug = 0; @@ -414,7 +414,8 @@ int decode_threshold_supermicro(uchar rval, uchar *thresh) * non-zero otherwise, to use default interpretations. * pstring = contains the sensor reading interpretation string (if rv==0) */ -int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen) +int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen, + int fsimple) { int i, rv = -1; uchar stype, etype, snum; @@ -455,7 +456,9 @@ int decode_sensor_supermicro(uchar *sdr,uchar *reading,char *pstring, int slen) sdr01 = (SDR01REC *)sdr; val = RawToFloat(reading[0],sdr); typestr = get_unit_type(sdr01->sens_units,sdr01->sens_base,sdr01->sens_mod, 0); - snprintf(pstring, slen, "%s %.2f %s",pstr,val,typestr); + if (fsimple) + snprintf(pstring, slen, "%s | %.2f %s",pstr,val,typestr); + else snprintf(pstring, slen, "%s %.2f %s",pstr,val,typestr); return(rv); } switch(stype) { |