mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
Put 'sensor thresh help' into function
Move help text for 'sensor thresh help' into its own function.
This commit is contained in:
parent
7560d4f2f4
commit
2b15969dcb
@ -43,6 +43,7 @@
|
|||||||
|
|
||||||
extern int verbose;
|
extern int verbose;
|
||||||
void printf_sensor_get_usage();
|
void printf_sensor_get_usage();
|
||||||
|
void print_sensor_thresh_usage();
|
||||||
|
|
||||||
// Macro's for Reading the current sensor Data.
|
// Macro's for Reading the current sensor Data.
|
||||||
#define SCANNING_DISABLED 0x40
|
#define SCANNING_DISABLED 0x40
|
||||||
@ -515,7 +516,6 @@ __ipmi_sensor_threshold_value_to_raw(struct sdr_record_full_sensor *full, double
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ipmi_sensor_set_threshold(struct ipmi_intf *intf, int argc, char **argv)
|
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;
|
struct sdr_record_list *sdr;
|
||||||
|
|
||||||
if (argc < 3 || strncmp(argv[0], "help", 4) == 0) {
|
if (argc < 3 || strncmp(argv[0], "help", 4) == 0) {
|
||||||
lprintf(LOG_NOTICE, "sensor thresh <id> <threshold> <setting>");
|
print_sensor_thresh_usage();
|
||||||
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 <id> lower <lnr> <lcr> <lnc>");
|
|
||||||
lprintf(LOG_NOTICE,
|
|
||||||
" Set all lower thresholds at the same time");
|
|
||||||
lprintf(LOG_NOTICE, "");
|
|
||||||
lprintf(LOG_NOTICE,
|
|
||||||
"sensor thresh <id> upper <unc> <ucr> <unr>");
|
|
||||||
lprintf(LOG_NOTICE,
|
|
||||||
" Set all upper thresholds at the same time");
|
|
||||||
lprintf(LOG_NOTICE, "");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -962,3 +936,45 @@ printf_sensor_get_usage()
|
|||||||
lprintf(LOG_NOTICE, "sensor get <id> ... [id]");
|
lprintf(LOG_NOTICE, "sensor get <id> ... [id]");
|
||||||
lprintf(LOG_NOTICE, " id : name of desired sensor");
|
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 <id> <threshold> <setting>");
|
||||||
|
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 <id> lower <lnr> <lcr> <lnc>");
|
||||||
|
lprintf(LOG_NOTICE,
|
||||||
|
" Set all lower thresholds at the same time");
|
||||||
|
lprintf(LOG_NOTICE,
|
||||||
|
"");
|
||||||
|
lprintf(LOG_NOTICE,
|
||||||
|
"sensor thresh <id> upper <unc> <ucr> <unr>");
|
||||||
|
lprintf(LOG_NOTICE,
|
||||||
|
" Set all upper thresholds at the same time");
|
||||||
|
lprintf(LOG_NOTICE, "");
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user