ID: 3597468 - 'lib/ipmi_mc.c' - print_mc_usage() prints to STDOUT

Commit replaces printf() with lprintf(LOG_NOTICE,...) to print help text on
STDERR as other ipmitool's sub-commands do.
This commit is contained in:
Zdenek Styblik 2012-12-20 04:54:44 +00:00
parent 970c5ff8b6
commit 791268a61c

View File

@ -162,25 +162,28 @@ static void
printf_mc_usage(void) printf_mc_usage(void)
{ {
struct bitfield_data * bf; struct bitfield_data * bf;
printf("MC Commands:\n"); lprintf(LOG_NOTICE, "MC Commands:");
printf(" reset <warm|cold>\n"); lprintf(LOG_NOTICE, " reset <warm|cold>");
printf(" guid\n"); lprintf(LOG_NOTICE, " guid");
printf(" info\n"); lprintf(LOG_NOTICE, " info");
printf(" watchdog <get|reset|off>\n"); lprintf(LOG_NOTICE, " watchdog <get|reset|off>");
printf(" selftest\n"); lprintf(LOG_NOTICE, " selftest");
printf(" getenables\n"); lprintf(LOG_NOTICE, " getenables");
printf(" setenables <option=on|off> ...\n"); lprintf(LOG_NOTICE, " setenables <option=on|off> ...");
for (bf = mc_enables_bf; bf->name != NULL; bf++) { for (bf = mc_enables_bf; bf->name != NULL; bf++) {
printf(" %-20s %s\n", bf->name, bf->desc); lprintf(LOG_NOTICE, " %-20s %s", bf->name, bf->desc);
} }
printf(" getsysinfo argument\n"); lprintf(LOG_NOTICE, " getsysinfo argument");
printf(" setsysinfo argument string\n"); lprintf(LOG_NOTICE, " setsysinfo argument string");
printf(" Valid arguments are:\n"); lprintf(LOG_NOTICE, " Valid arguments are:");
printf(" primary_os_name Primary operating system name\n"); lprintf(LOG_NOTICE,
printf(" os_name Operating system name\n"); " primary_os_name Primary operating system name");
printf(" system_name System Name of server (vendor dependent\n"); lprintf(LOG_NOTICE, " os_name Operating system name");
printf(" delloem_os_version Running version of operating system\n"); lprintf(LOG_NOTICE,
printf(" delloem_url Url of bmc webserver\n"); " system_name System Name of server (vendor dependent");
lprintf(LOG_NOTICE,
" delloem_os_version Running version of operating system");
lprintf(LOG_NOTICE, " delloem_url Url of bmc webserver");
} }