|
1 Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved |
|
2 |
|
3 --- ipmitool-1.8.11.old/lib/ipmi_fru.c Wed Feb 25 12:38:52 2009 |
|
4 +++ ipmitool-1.8.11/lib/ipmi_fru.c Thu Oct 27 12:28:57 2011 |
|
5 @@ -1310,12 +1310,20 @@ |
|
6 printf (" Peak capacity holdup : %d s\n", |
|
7 peak_hold_up_time); |
|
8 if (ps->combined_capacity == 0) |
|
9 - printf (" Combined capacity : not specified\n"); |
|
10 - else |
|
11 - printf (" Combined capacity : %d W (%s and %s)\n", |
|
12 - ps->combined_capacity, |
|
13 - combined_voltage_desc [ps->combined_voltage1], |
|
14 - combined_voltage_desc [ps->combined_voltage2]); |
|
15 + printf (" Combined capacity : not specified\n"); |
|
16 + else { |
|
17 + if ((ps->combined_voltage1 < |
|
18 + sizeof(combined_voltage_desc)/sizeof(char *)) && |
|
19 + (ps->combined_voltage2 < |
|
20 + sizeof(combined_voltage_desc)/sizeof(char *))) |
|
21 + printf (" Combined capacity : %d W (%s and %s)\n", |
|
22 + ps->combined_capacity, |
|
23 + combined_voltage_desc [ps->combined_voltage1], |
|
24 + combined_voltage_desc [ps->combined_voltage2]); |
|
25 + else |
|
26 + printf (" Combined capacity : %d W (voltages not specified correctly)\n", |
|
27 + ps->combined_capacity); |
|
28 + } |
|
29 if (ps->predictive_fail) |
|
30 printf (" Fan lower threshold : %d RPS\n", |
|
31 ps->rps_threshold); |