ID: 3592732 - 'lib/ipmi_picmg.c' - printf() misuse

Commit replaces printf() with appropriate lprintf() calls. Some error messages
got changed as well.
This commit is contained in:
Zdenek Styblik 2012-12-05 07:22:55 +00:00
parent daf4c4831f
commit 6733b66a9c

View File

@ -225,7 +225,7 @@ ipmi_picmg_properties(struct ipmi_intf * intf, int show )
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp || rsp->ccode) { if (!rsp || rsp->ccode) {
printf("Error getting address information\n"); lprintf(LOG_ERR, "Error getting address information.");
return -1; return -1;
} }
@ -281,11 +281,11 @@ ipmi_picmg_fru_activation(struct ipmi_intf * intf, int argc, char ** argv, unsig
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp || rsp->ccode) { if (!rsp || rsp->ccode) {
printf("Error activation/deactivation of FRU\n"); lprintf(LOG_ERR, "Error activation/deactivation of FRU.");
return -1; return -1;
} }
if (rsp->data[0] != 0x00) { if (rsp->data[0] != 0x00) {
printf("Error\n"); lprintf(LOG_ERR, "Error activation/deactivation of FRU.");
} }
return 0; return 0;
@ -313,11 +313,12 @@ ipmi_picmg_fru_activation_policy_get(struct ipmi_intf * intf, int argc, char **
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "FRU activation policy get failed with CC code 0x%02x",
rsp->ccode);
return -1; return -1;
} }
@ -351,12 +352,13 @@ ipmi_picmg_fru_activation_policy_set(struct ipmi_intf * intf, int argc, char **
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "FRU activation policy set failed with CC code 0x%02x",
rsp->ccode);
return -1; return -1;
} }
@ -390,13 +392,14 @@ ipmi_picmg_portstate_get(struct ipmi_intf * intf, int interface,int channel,
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
if( mode == PICMG_EKEY_MODE_QUERY ){ if( mode == PICMG_EKEY_MODE_QUERY ){
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "FRU portstate get failed with CC code 0x%02x",
rsp->ccode);
} }
return -1; return -1;
} }
@ -497,7 +500,7 @@ ipmi_picmg_portstate_get(struct ipmi_intf * intf, int interface,int channel,
} }
else else
{ {
lprintf(LOG_NOTICE,"Unexpected answer, can't print result"); lprintf(LOG_ERR, "Unexpected answer, can't print result.");
} }
return 0; return 0;
@ -530,12 +533,13 @@ ipmi_picmg_portstate_set(struct ipmi_intf * intf, int interface, int channel,
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "Picmg portstate set failed with CC code 0x%02x",
rsp->ccode);
return -1; return -1;
} }
@ -580,13 +584,14 @@ ipmi_picmg_amc_portstate_get(struct ipmi_intf * intf,int device,int channel,
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
if( mode == PICMG_EKEY_MODE_QUERY ){ if( mode == PICMG_EKEY_MODE_QUERY ){
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "Amc portstate get failed with CC code 0x%02x",
rsp->ccode);
} }
return -1; return -1;
} }
@ -720,12 +725,13 @@ ipmi_picmg_amc_portstate_set(struct ipmi_intf * intf, int channel, int port,
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "Amc portstate set failed with CC code 0x%02x",
rsp->ccode);
return -1; return -1;
} }
@ -754,12 +760,13 @@ ipmi_picmg_get_led_properties(struct ipmi_intf * intf, int argc, char ** argv)
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "LED get properties failed with CC code 0x%02x",
rsp->ccode);
return -1; return -1;
} }
@ -793,12 +800,13 @@ ipmi_picmg_get_led_capabilities(struct ipmi_intf * intf, int argc, char ** argv)
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "LED get capabilities failed with CC code 0x%02x",
rsp->ccode);
return -1; return -1;
} }
@ -840,12 +848,12 @@ ipmi_picmg_get_led_state(struct ipmi_intf * intf, int argc, char ** argv)
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "LED get state failed with CC code 0x%02x", rsp->ccode);
return -1; return -1;
} }
@ -924,12 +932,12 @@ ipmi_picmg_set_led_state(struct ipmi_intf * intf, int argc, char ** argv)
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "LED set state failed with CC code 0x%02x", rsp->ccode);
return -1; return -1;
} }
@ -961,12 +969,12 @@ ipmi_picmg_get_power_level(struct ipmi_intf * intf, int argc, char ** argv)
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "Power level get failed with CC code 0x%02x", rsp->ccode);
return -1; return -1;
} }
@ -1005,12 +1013,12 @@ ipmi_picmg_set_power_level(struct ipmi_intf * intf, int argc, char ** argv)
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "Power level set failed with CC code 0x%02x", rsp->ccode);
return -1; return -1;
} }
@ -1096,12 +1104,12 @@ ipmi_picmg_fru_control(struct ipmi_intf * intf, int argc, char ** argv)
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("frucontrol: no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
printf("frucontrol: returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "frucontrol failed with CC code 0x%02x", rsp->ccode);
return -1; return -1;
} else { } else {
printf("frucontrol: ok\n"); printf("frucontrol: ok\n");
@ -1143,12 +1151,12 @@ ipmi_picmg_clk_get(struct ipmi_intf * intf, int clk_id,int clk_res,int mode)
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode && (mode == PICMG_EKEY_MODE_QUERY) ) { if (rsp->ccode && (mode == PICMG_EKEY_MODE_QUERY) ) {
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "Clk get failed with CC code 0x%02x", rsp->ccode);
return -1; return -1;
} }
@ -1251,7 +1259,7 @@ ipmi_picmg_clk_set(struct ipmi_intf * intf, int argc, char ** argv)
} }
else else
{ {
printf("missing resource id for atca board\n"); lprintf(LOG_ERR, "Missing resource id for atca board.");
return -1; return -1;
} }
} }
@ -1269,12 +1277,12 @@ printf("## res: %d\n", msg_data[10]);
rsp = intf->sendrecv(intf, &req); rsp = intf->sendrecv(intf, &req);
if (!rsp) { if (!rsp) {
printf("no response\n"); lprintf(LOG_ERR, "No valid response received.");
return -1; return -1;
} }
if (rsp->ccode) { if (rsp->ccode) {
printf("returned CC code 0x%02x\n", rsp->ccode); lprintf(LOG_ERR, "Clk set failed with CC code 0x%02x", rsp->ccode);
return -1; return -1;
} }
@ -1310,7 +1318,7 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
ipmi_picmg_bused_resource(intf, PICMG_BUSED_RESOURCE_SUMMARY ); ipmi_picmg_bused_resource(intf, PICMG_BUSED_RESOURCE_SUMMARY );
} }
} else { } else {
printf("usage: busres summary\n"); lprintf(LOG_NOTICE, "usage: busres summary");
} }
} }
/* fru control command */ /* fru control command */
@ -1319,14 +1327,14 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
rc = ipmi_picmg_fru_control(intf, argc-1, &(argv[1])); rc = ipmi_picmg_fru_control(intf, argc-1, &(argv[1]));
} }
else { else {
printf("usage: frucontrol <FRU-ID> <OPTION>\n"); lprintf(LOG_NOTICE, "usage: frucontrol <FRU-ID> <OPTION>");
printf(" OPTION:\n"); lprintf(LOG_NOTICE, " OPTION:");
printf(" 0 - Cold Reset\n"); lprintf(LOG_NOTICE, " 0 - Cold Reset");
printf(" 1 - Warm Reset\n"); lprintf(LOG_NOTICE, " 1 - Warm Reset");
printf(" 2 - Graceful Reboot\n"); lprintf(LOG_NOTICE, " 2 - Graceful Reboot");
printf(" 3 - Issue Diagnostic Interrupt\n"); lprintf(LOG_NOTICE, " 3 - Issue Diagnostic Interrupt");
printf(" 4 - Quiesce [AMC only]\n"); lprintf(LOG_NOTICE, " 4 - Quiesce [AMC only]");
printf(" 5-255 - Reserved\n"); lprintf(LOG_NOTICE, " 5-255 - Reserved");
return -1; return -1;
} }
@ -1339,7 +1347,7 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
rc = ipmi_picmg_fru_activation(intf, argc-1, &(argv[1]), PICMG_FRU_ACTIVATE); rc = ipmi_picmg_fru_activation(intf, argc-1, &(argv[1]), PICMG_FRU_ACTIVATE);
} }
else { else {
printf("specify the FRU to activate\n"); lprintf(LOG_ERR, "Specify the FRU to activate.");
return -1; return -1;
} }
} }
@ -1349,7 +1357,7 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
if (argc > 1) { if (argc > 1) {
rc = ipmi_picmg_fru_activation(intf, argc-1, &(argv[1]), PICMG_FRU_DEACTIVATE); rc = ipmi_picmg_fru_activation(intf, argc-1, &(argv[1]), PICMG_FRU_DEACTIVATE);
}else { }else {
printf("specify the FRU to deactivate\n"); lprintf(LOG_ERR, "Specify the FRU to deactivate.");
return -1; return -1;
} }
} }
@ -1361,25 +1369,28 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
if (argc > 2) { if (argc > 2) {
rc = ipmi_picmg_fru_activation_policy_get(intf, argc-1, &(argv[2])); rc = ipmi_picmg_fru_activation_policy_get(intf, argc-1, &(argv[2]));
} else { } else {
printf("usage: get <fruid>\n"); lprintf(LOG_NOTICE, "usage: get <fruid>");
} }
} else if (!strncmp(argv[1], "set", 3)) { } else if (!strncmp(argv[1], "set", 3)) {
if (argc > 4) { if (argc > 4) {
rc = ipmi_picmg_fru_activation_policy_set(intf, argc-1, &(argv[2])); rc = ipmi_picmg_fru_activation_policy_set(intf, argc-1, &(argv[2]));
} else { } else {
printf("usage: set <fruid> <lockmask> <lock>\n"); lprintf(LOG_NOTICE, "usage: set <fruid> <lockmask> <lock>");
printf(" lockmask: [1] affect the deactivation locked bit\n"); lprintf(LOG_NOTICE,
printf(" [0] affect the activation locked bit\n"); " lockmask: [1] affect the deactivation locked bit");
printf(" lock: [1] set/clear deactivation locked\n"); lprintf(LOG_NOTICE,
printf(" [0] set/clear locked \n"); " [0] affect the activation locked bit");
lprintf(LOG_NOTICE,
" lock: [1] set/clear deactivation locked");
lprintf(LOG_NOTICE, " [0] set/clear locked");
} }
} }
else { else {
printf("specify fru\n"); lprintf(LOG_ERR, "Specify FRU.");
return -1; return -1;
} }
} else { } else {
printf("wrong parameters\n"); lprintf(LOG_ERR, "Wrong parameters.");
return -1; return -1;
} }
} }
@ -1435,7 +1446,7 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
PICMG_EKEY_MODE_QUERY ); PICMG_EKEY_MODE_QUERY );
} }
else { else {
printf("<intf> <chn>|getall|getgranted|getdenied\n"); lprintf(LOG_NOTICE, "<intf> <chn>|getall|getgranted|getdenied");
} }
} }
else if (!strncmp(argv[1], "set", 3)) { else if (!strncmp(argv[1], "set", 3)) {
@ -1460,13 +1471,14 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
channel, port, type, typeext ,group ,enable); channel, port, type, typeext ,group ,enable);
} }
else { else {
printf("<intf> <chn> <port> <type> <ext> <group> <1|0>\n"); lprintf(LOG_NOTICE,
"<intf> <chn> <port> <type> <ext> <group> <1|0>");
return -1; return -1;
} }
} }
} }
else { else {
printf("<set>|<getall>|<getgranted>|<getdenied>\n"); lprintf(LOG_NOTICE, "<set>|<getall>|<getgranted>|<getdenied>");
return -1; return -1;
} }
} }
@ -1532,7 +1544,7 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
PICMG_EKEY_MODE_QUERY ); PICMG_EKEY_MODE_QUERY );
} }
else { else {
printf("<chn> <device>|getall|getgranted|getdenied\n"); lprintf(LOG_NOTICE, "<chn> <device>|getall|getgranted|getdenied");
} }
} }
else if (!strncmp(argv[1], "set", 3)) { else if (!strncmp(argv[1], "set", 3)) {
@ -1560,13 +1572,14 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
typeext, group, enable, device); typeext, group, enable, device);
} }
else { else {
printf("<chn> <portflags> <type> <ext> <group> <1|0> [<device>]\n"); lprintf(LOG_NOTICE,
"<chn> <portflags> <type> <ext> <group> <1|0> [<device>]");
return -1; return -1;
} }
} }
} }
else { else {
printf("<set>|<get>|<getall>|<getgranted>|<getdenied>\n"); lprintf(LOG_NOTICE, "<set>|<get>|<getall>|<getgranted>|<getdenied>");
return -1; return -1;
} }
} }
@ -1578,7 +1591,7 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
rc = ipmi_picmg_get_led_properties(intf, argc-1, &(argv[2])); rc = ipmi_picmg_get_led_properties(intf, argc-1, &(argv[2]));
} }
else { else {
printf("led prop <FRU-ID>\n"); lprintf(LOG_NOTICE, "led prop <FRU-ID>");
} }
} }
else if (!strncmp(argv[1], "cap", 3)) { else if (!strncmp(argv[1], "cap", 3)) {
@ -1586,7 +1599,7 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
rc = ipmi_picmg_get_led_capabilities(intf, argc-1, &(argv[2])); rc = ipmi_picmg_get_led_capabilities(intf, argc-1, &(argv[2]));
} }
else { else {
printf("led cap <FRU-ID> <LED-ID>\n"); lprintf(LOG_NOTICE, "led cap <FRU-ID> <LED-ID>");
} }
} }
else if (!strncmp(argv[1], "get", 3)) { else if (!strncmp(argv[1], "get", 3)) {
@ -1594,7 +1607,7 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
rc = ipmi_picmg_get_led_state(intf, argc-1, &(argv[2])); rc = ipmi_picmg_get_led_state(intf, argc-1, &(argv[2]));
} }
else { else {
printf("led get <FRU-ID> <LED-ID>\n"); lprintf(LOG_NOTICE, "led get <FRU-ID> <LED-ID>");
} }
} }
else if (!strncmp(argv[1], "set", 3)) { else if (!strncmp(argv[1], "set", 3)) {
@ -1602,34 +1615,39 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
rc = ipmi_picmg_set_led_state(intf, argc-1, &(argv[2])); rc = ipmi_picmg_set_led_state(intf, argc-1, &(argv[2]));
} }
else { else {
printf("led set <FRU-ID> <LED-ID> <function> <duration> <color>\n"); lprintf(LOG_NOTICE,
printf(" <FRU-ID>\n"); "led set <FRU-ID> <LED-ID> <function> <duration> <color>");
printf(" <LED-ID> 0: Blue LED\n"); lprintf(LOG_NOTICE, " <FRU-ID>");
printf(" 1: LED 1\n"); lprintf(LOG_NOTICE, " <LED-ID> 0: Blue LED");
printf(" 2: LED 2\n"); lprintf(LOG_NOTICE, " 1: LED 1");
printf(" 3: LED 3\n"); lprintf(LOG_NOTICE, " 2: LED 2");
printf(" 0x04-0xFE: OEM defined\n"); lprintf(LOG_NOTICE, " 3: LED 3");
printf(" 0xFF: All LEDs under management control\n"); lprintf(LOG_NOTICE, " 0x04-0xFE: OEM defined");
printf(" <function> 0: LED OFF override\n"); lprintf(LOG_NOTICE,
printf(" 1 - 250: LED blinking override (off duration)\n"); " 0xFF: All LEDs under management control");
printf(" 251: LED Lamp Test\n"); lprintf(LOG_NOTICE, " <function> 0: LED OFF override");
printf(" 252: LED restore to local control\n"); lprintf(LOG_NOTICE,
printf(" 255: LED ON override\n"); " 1 - 250: LED blinking override (off duration)");
printf(" <duration> 1 - 127: LED Lamp Test / on duration\n"); lprintf(LOG_NOTICE, " 251: LED Lamp Test");
printf(" <color> 0: reserved\n"); lprintf(LOG_NOTICE,
printf(" 1: BLUE\n"); " 252: LED restore to local control");
printf(" 2: RED\n"); lprintf(LOG_NOTICE, " 255: LED ON override");
printf(" 3: GREEN\n"); lprintf(LOG_NOTICE,
printf(" 4: AMBER\n"); " <duration> 1 - 127: LED Lamp Test / on duration");
printf(" 5: ORANGE\n"); lprintf(LOG_NOTICE, " <color> 0: reserved");
printf(" 6: WHITE\n"); lprintf(LOG_NOTICE, " 1: BLUE");
printf(" 7: reserved\n"); lprintf(LOG_NOTICE, " 2: RED");
printf(" 0xE: do not change\n"); lprintf(LOG_NOTICE, " 3: GREEN");
printf(" 0xF: use default color\n"); lprintf(LOG_NOTICE, " 4: AMBER");
lprintf(LOG_NOTICE, " 5: ORANGE");
lprintf(LOG_NOTICE, " 6: WHITE");
lprintf(LOG_NOTICE, " 7: reserved");
lprintf(LOG_NOTICE, " 0xE: do not change");
lprintf(LOG_NOTICE, " 0xF: use default color");
} }
} }
else { else {
printf("prop | cap | get | set\n"); lprintf(LOG_NOTICE, "prop | cap | get | set");
} }
} }
} }
@ -1641,11 +1659,12 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
rc = ipmi_picmg_get_power_level(intf, argc-1, &(argv[2])); rc = ipmi_picmg_get_power_level(intf, argc-1, &(argv[2]));
} }
else { else {
printf("power get <FRU-ID> <type>\n"); lprintf(LOG_NOTICE, "power get <FRU-ID> <type>");
printf(" <type> 0 : steady state power draw levels\n"); lprintf(LOG_NOTICE, " <type> 0 : steady state power draw levels");
printf(" 1 : desired steady state draw levels\n"); lprintf(LOG_NOTICE,
printf(" 2 : early power draw levels\n"); " 1 : desired steady state draw levels");
printf(" 3 : desired early levels\n"); lprintf(LOG_NOTICE, " 2 : early power draw levels");
lprintf(LOG_NOTICE, " 3 : desired early levels");
return -1; return -1;
} }
@ -1655,24 +1674,25 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
rc = ipmi_picmg_set_power_level(intf, argc-1, &(argv[2])); rc = ipmi_picmg_set_power_level(intf, argc-1, &(argv[2]));
} }
else { else {
printf("power set <FRU-ID> <level> <present-desired>\n"); lprintf(LOG_NOTICE, "power set <FRU-ID> <level> <present-desired>");
printf(" <level> 0 : Power Off\n"); lprintf(LOG_NOTICE, " <level> 0 : Power Off");
printf(" 0x1-0x14 : Power level\n"); lprintf(LOG_NOTICE, " 0x1-0x14 : Power level");
printf(" 0xFF : do not change\n"); lprintf(LOG_NOTICE, " 0xFF : do not change");
printf("\n"); lprintf(LOG_NOTICE,
printf(" <present-desired> 0: do not change present levels\n"); "\n <present-desired> 0: do not change present levels");
printf(" 1: copy desired to present level\n"); lprintf(LOG_NOTICE,
" 1: copy desired to present level");
return -1; return -1;
} }
} }
else { else {
printf("<set>|<get>\n"); lprintf(LOG_NOTICE, "<set>|<get>");
return -1; return -1;
} }
} }
else { else {
printf("<set>|<get>\n"); lprintf(LOG_NOTICE, "<set>|<get>");
return -1; return -1;
} }
}/* clk commands*/ }/* clk commands*/
@ -1724,8 +1744,9 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
PICMG_EKEY_MODE_QUERY ); PICMG_EKEY_MODE_QUERY );
} }
else { else {
printf("clk get "); lprintf(LOG_NOTICE, "clk get");
printf("<CLK-ID> [<DEV-ID>] |getall|getgranted|getdenied\n"); lprintf(LOG_NOTICE,
"<CLK-ID> [<DEV-ID>] |getall|getgranted|getdenied");
return -1; return -1;
} }
} }
@ -1734,18 +1755,19 @@ ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv)
rc = ipmi_picmg_clk_set(intf, argc-1, &(argv[2])); rc = ipmi_picmg_clk_set(intf, argc-1, &(argv[2]));
} }
else { else {
printf("clk set <CLK-ID> <index> <setting> <family> <acc-lvl> <freq> [<DEV-ID>] \n"); lprintf(LOG_NOTICE,
"clk set <CLK-ID> <index> <setting> <family> <acc-lvl> <freq> [<DEV-ID>]");
return -1; return -1;
} }
} }
else { else {
printf("<set>|<get>|<getall>|<getgranted>|<getdenied>\n"); lprintf(LOG_NOTICE, "<set>|<get>|<getall>|<getgranted>|<getdenied>");
return -1; return -1;
} }
} }
else { else {
printf("<set>|<get>|<getall>|<getgranted>|<getdenied>\n"); lprintf(LOG_NOTICE, "<set>|<get>|<getall>|<getgranted>|<getdenied>");
return -1; return -1;
} }
} }