ID: 3608763 - ipmi_sdr_print_type() print error if sensor not found

'sdr type <TYPE_OF_SENSOR>' - print error message if sensor of given type
was not found.

Commit for Dan Gora
This commit is contained in:
Zdenek Styblik 2013-04-12 13:11:26 +00:00
parent 1602e0a7a2
commit 39408ea589

View File

@ -4464,6 +4464,8 @@ ipmi_sdr_print_type(struct ipmi_intf *intf, char *type)
} }
} }
if (sensor_type != x) { if (sensor_type != x) {
lprintf(LOG_ERR, "Sensor Type \"%s\" not found.",
type);
printf("Sensor Types:\n"); printf("Sensor Types:\n");
for (x = 1; x < SENSOR_TYPE_MAX; x += 2) { for (x = 1; x < SENSOR_TYPE_MAX; x += 2) {
printf("\t%-25s (0x%02x) %-25s (0x%02x)\n", printf("\t%-25s (0x%02x) %-25s (0x%02x)\n",