--- ipmitool-1.8.11/lib/ipmi_fru.c.orig 2012-12-07 15:48:31.000000000 +0100 +++ ipmitool-1.8.11/lib/ipmi_fru.c 2012-12-12 16:12:50.000000000 +0100 @@ -2505,7 +2505,7 @@ __ipmi_fru_print(struct ipmi_intf * intf if (rsp->ccode > 0) { printf(" Device not present (%s)\n", val2str(rsp->ccode, completion_code_vals)); - return -1; + return (rsp->ccode == 0xcb) ? 1 : -1; } fru.size = (rsp->data[1] << 8) | rsp->data[0]; @@ -2536,12 +2536,12 @@ __ipmi_fru_print(struct ipmi_intf * intf rsp = intf->sendrecv(intf, &req); if (rsp == NULL) { printf(" Device not present (No Response)\n"); - return 1; + return -1; } if (rsp->ccode > 0) { printf(" Device not present (%s)\n", val2str(rsp->ccode, completion_code_vals)); - return 1; + return -1; } if (verbose > 1) @@ -2698,7 +2698,7 @@ ipmi_fru_print_all(struct ipmi_intf * in rc = ipmi_fru_print(intf, NULL); printf("\n"); - if ((itr = ipmi_sdr_start(intf, 0)) == NULL) + if (rc == -1 || (itr = ipmi_sdr_start(intf, 0)) == NULL) return -1; while ((header = ipmi_sdr_get_next_header(intf, itr)) != NULL)