diff --git a/lib/ipmi_sensor.c b/lib/ipmi_sensor.c index 4ef5138..f371b84 100644 --- a/lib/ipmi_sensor.c +++ b/lib/ipmi_sensor.c @@ -43,6 +43,7 @@ extern int verbose; void printf_sensor_get_usage(); +void print_sensor_thresh_usage(); // Macro's for Reading the current sensor Data. #define SCANNING_DISABLED 0x40 @@ -515,7 +516,6 @@ __ipmi_sensor_threshold_value_to_raw(struct sdr_record_full_sensor *full, double } } - static int ipmi_sensor_set_threshold(struct ipmi_intf *intf, int argc, char **argv) { @@ -531,33 +531,7 @@ ipmi_sensor_set_threshold(struct ipmi_intf *intf, int argc, char **argv) struct sdr_record_list *sdr; if (argc < 3 || strncmp(argv[0], "help", 4) == 0) { - lprintf(LOG_NOTICE, "sensor thresh "); - lprintf(LOG_NOTICE, - " id : name of the sensor for which threshold is to be set"); - lprintf(LOG_NOTICE, " threshold : which threshold to set"); - lprintf(LOG_NOTICE, - " unr = upper non-recoverable"); - lprintf(LOG_NOTICE, " ucr = upper critical"); - lprintf(LOG_NOTICE, - " unc = upper non-critical"); - lprintf(LOG_NOTICE, - " lnc = lower non-critical"); - lprintf(LOG_NOTICE, " lcr = lower critical"); - lprintf(LOG_NOTICE, - " lnr = lower non-recoverable"); - lprintf(LOG_NOTICE, - " setting : the value to set the threshold to"); - lprintf(LOG_NOTICE, ""); - lprintf(LOG_NOTICE, - "sensor thresh lower "); - lprintf(LOG_NOTICE, - " Set all lower thresholds at the same time"); - lprintf(LOG_NOTICE, ""); - lprintf(LOG_NOTICE, - "sensor thresh upper "); - lprintf(LOG_NOTICE, - " Set all upper thresholds at the same time"); - lprintf(LOG_NOTICE, ""); + print_sensor_thresh_usage(); return 0; } @@ -962,3 +936,45 @@ printf_sensor_get_usage() lprintf(LOG_NOTICE, "sensor get ... [id]"); lprintf(LOG_NOTICE, " id : name of desired sensor"); } + +/* printf_sensor_thresh_set_usage - print usage for # ipmitool sensor thresh; + * + * @returns: void + */ +void +print_sensor_thresh_usage() +{ + lprintf(LOG_NOTICE, +"sensor thresh "); + lprintf(LOG_NOTICE, +" id : name of the sensor for which threshold is to be set"); + lprintf(LOG_NOTICE, +" threshold : which threshold to set"); + lprintf(LOG_NOTICE, +" unr = upper non-recoverable"); + lprintf(LOG_NOTICE, +" ucr = upper critical"); + lprintf(LOG_NOTICE, +" unc = upper non-critical"); + lprintf(LOG_NOTICE, +" lnc = lower non-critical"); + lprintf(LOG_NOTICE, +" lcr = lower critical"); + lprintf(LOG_NOTICE, +" lnr = lower non-recoverable"); + lprintf(LOG_NOTICE, +" setting : the value to set the threshold to"); + lprintf(LOG_NOTICE, +""); + lprintf(LOG_NOTICE, +"sensor thresh lower "); + lprintf(LOG_NOTICE, +" Set all lower thresholds at the same time"); + lprintf(LOG_NOTICE, +""); + lprintf(LOG_NOTICE, +"sensor thresh upper "); + lprintf(LOG_NOTICE, +" Set all upper thresholds at the same time"); + lprintf(LOG_NOTICE, ""); +}