mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
sdr: Refactor/optimize code. No functional changes.
This commit is contained in:
parent
2de8a5e1a9
commit
928716244d
@ -4274,50 +4274,25 @@ ipmi_sdr_print_info(struct ipmi_intf *intf)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sdr_repository_info.delete_sdr_supported && sdr_repository_info.partial_add_sdr_supported)
|
printf("Most recent Addition : ");
|
||||||
|
if (sdr_repository_info.partial_add_sdr_supported)
|
||||||
{
|
{
|
||||||
timestamp =
|
timestamp = ipmi32toh(sdr_repository_info
|
||||||
(sdr_repository_info.most_recent_addition_timestamp[3] << 24) |
|
.most_recent_addition_timestamp);
|
||||||
(sdr_repository_info.most_recent_addition_timestamp[2] << 16) |
|
printf("%s\n", ipmi_sdr_timestamp(timestamp));
|
||||||
(sdr_repository_info.most_recent_addition_timestamp[1] << 8) |
|
}
|
||||||
sdr_repository_info.most_recent_addition_timestamp[0];
|
else {
|
||||||
printf("Most recent Addition : %s\n",
|
printf("NA\n");
|
||||||
ipmi_sdr_timestamp(timestamp));
|
}
|
||||||
|
|
||||||
timestamp =
|
printf("Most recent Erase : ");
|
||||||
(sdr_repository_info.most_recent_erase_timestamp[3] << 24) |
|
if(sdr_repository_info.delete_sdr_supported) {
|
||||||
(sdr_repository_info.most_recent_erase_timestamp[2] << 16) |
|
timestamp = ipmi32toh(sdr_repository_info
|
||||||
(sdr_repository_info.most_recent_erase_timestamp[1] << 8) |
|
.most_recent_erase_timestamp);
|
||||||
sdr_repository_info.most_recent_erase_timestamp[0];
|
printf("%s\n", ipmi_sdr_timestamp(timestamp));
|
||||||
printf("Most recent Erase : %s\n",
|
|
||||||
ipmi_sdr_timestamp(timestamp));
|
|
||||||
}
|
}
|
||||||
else if (sdr_repository_info.partial_add_sdr_supported)
|
else {
|
||||||
{
|
printf("NA\n");
|
||||||
timestamp =
|
|
||||||
(sdr_repository_info.most_recent_addition_timestamp[3] << 24) |
|
|
||||||
(sdr_repository_info.most_recent_addition_timestamp[2] << 16) |
|
|
||||||
(sdr_repository_info.most_recent_addition_timestamp[1] << 8) |
|
|
||||||
sdr_repository_info.most_recent_addition_timestamp[0];
|
|
||||||
printf("Most recent Addition : %s\n",
|
|
||||||
ipmi_sdr_timestamp(timestamp));
|
|
||||||
printf("Most recent Erase : NA\n");
|
|
||||||
}
|
|
||||||
else if(sdr_repository_info.delete_sdr_supported)
|
|
||||||
{
|
|
||||||
printf("Most recent Addition : NA\n");
|
|
||||||
timestamp =
|
|
||||||
(sdr_repository_info.most_recent_erase_timestamp[3] << 24) |
|
|
||||||
(sdr_repository_info.most_recent_erase_timestamp[2] << 16) |
|
|
||||||
(sdr_repository_info.most_recent_erase_timestamp[1] << 8) |
|
|
||||||
sdr_repository_info.most_recent_erase_timestamp[0];
|
|
||||||
printf("Most recent Erase : %s\n",
|
|
||||||
ipmi_sdr_timestamp(timestamp));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf("Most recent Addition : NA\n");
|
|
||||||
printf("Most recent Erase : NA\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("SDR overflow : %s\n",
|
printf("SDR overflow : %s\n",
|
||||||
@ -4351,7 +4326,7 @@ ipmi_sdr_print_info(struct ipmi_intf *intf)
|
|||||||
reserve_sdr_repository_supported ? "yes" : "no");
|
reserve_sdr_repository_supported ? "yes" : "no");
|
||||||
printf("SDR Repository Alloc info supported : %s\n",
|
printf("SDR Repository Alloc info supported : %s\n",
|
||||||
sdr_repository_info.
|
sdr_repository_info.
|
||||||
get_sdr_repository_allo_info_supported ? "yes" : "no");
|
get_sdr_repository_allo_info_supported ? "yes" : "no");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user