* Byte 16: ID of the error detected on the PCle device that triggered this SEL record
*/
- /* Potentially all error status bits could be set for a given PCIe device.
- * Therefore, iterate over all 32 bits each of cor and uncor errors
+ /*
+ * Potentially all error status bits could be set for a given PCIe
+ * device. Therefore, iterate over all 32 bits each of cor and uncor
+ * errors.
*/
for (i = 0; i < 32; i++) {
if ((status & (1 << i)) && idarray[i]) {
- sprintf(openbmc_ipmi_add_sel,
- "ipmitool raw 0x0a 0x44 0x00 0x00 0xFB 0x20 0x00 0x00 0x00 0x00 0x01 0x00 0x%02x 0x%02x 0x01 0x00 0xff %s",
- dev_fn, bus, idarray[i]);
+ snprintf(openbmc_ipmi_add_sel,
+ sizeof(openbmc_ipmi_add_sel),
+ "ipmitool raw 0x0a 0x44 0x00 0x00 0xFB 0x20 0x00 0x00 0x00 0x00 0x01 0x00 0x%02x 0x%02x 0x01 0x00 0xff %s",
+ dev_fn, bus, idarray[i]);
if (system(openbmc_ipmi_add_sel) != 0)
return -1;
}
sscanf(dev_name, "%*x:%x:%x.%x", &bus, &dev, &fn);
dev_fn = (((dev & 0x1f) << 3) | (fn & 0x7));
- /* Use the appropriate correctable error status ID
+ /*
+ * Use the appropriate correctable error status ID
* for a given severity level
- * */
+ */
if (severity == HW_EVENT_AER_CORRECTED) {
if (verify_id_log_sel(status, cor_error_ids, bus, dev_fn) < 0)
return -1;