#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <stdarg.h>
#include <string.h>
#include "librtasevent.h"
#include "rtas_event.h"
Functions | |
| int | print_scn_title (char *fmt,...) |
| print the title of the RTAS event section | |
| int | print_raw_data (char *data, int data_len) |
| dump raw data | |
| int | rtas_print_raw_event (FILE *stream, struct rtas_event *re) |
| Dump the entire rtas event in raw format. | |
| static char * | rtas_error_type (int type) |
| print a description of the RTAS error type | |
| int | rtas_set_print_width (int width) |
| set the output character width for librtasevent | |
| int | rtas_print (char *fmt,...) |
| routine to handle all librtas printing | |
| int | re_print_generic (char *title, struct rtas_event_scn *res, int verbosity) |
| generic routine to print the contents of an unknown section type | |
| int | rtas_print_scn (FILE *stream, struct rtas_event_scn *res, int verbosity) |
| print the contents of the specified rtas event section | |
| int | rtas_print_event (FILE *stream, struct rtas_event *re, int verbosity) |
| print the contents of an entire rtas event | |
| struct rtas_event_scn * | rtas_get_event_hdr_scn (struct rtas_event *re) |
| Retrieve the Main RTAS event header. | |
| int | print_re_hdr_scn (struct rtas_event_scn *res, int verbosity) |
| Print the contents of an RTAS main event header. | |
| struct rtas_event_scn * | rtas_get_event_exthdr_scn (struct rtas_event *re) |
| Retrieve the RTAS Event extended header. | |
| int | print_re_exthdr_scn (struct rtas_event_scn *res, int verbosity) |
| print the contents of the RTAS extended header section | |
| struct rtas_event_scn * | rtas_get_ibmdiag_scn (struct rtas_event *re) |
| Retrieve the IBM Diagnostic Log section of the RTAS Event. | |
| int | print_re_ibmdiag_scn (struct rtas_event_scn *res, int verbosity) |
| print the contents of an IBM diagnostics log section | |
| int | print_re_vend_specific_scn (struct rtas_event_scn *res, int verbosity) |
| print the contents of a vendor specific section | |
Variables | |
| static int | rtas_print_width = 80 |
| character width of the librtasevent output | |
| static int | line_offset = 0 |
| current character offset into the print line | |
| static FILE * | ostream |
| output stream for librtasevent printing | |
| static int(* | re_print_fns [])() |
| arrary of function pointers for printing RTAS event sections | |
| static char * | rtas_severity_names [] |
| description of the RTAS severity levels | |
| static char * | rtas_disposition_names [] |
| description of the RTAS event disposition levels | |
| char * | rtas_entity_names [] |
| description of the initiator and target names | |
| static char * | rtas_event_error_type [] |
| description of some of the RTAS error types | |
| int print_raw_data | ( | char * | data, | |
| int | data_len | |||
| ) |
print_raw_data
| data | pointer to data to dump | |
| data_len | length of data to dump |
| int print_re_exthdr_scn | ( | struct rtas_event_scn * | res, | |
| int | verbosity | |||
| ) |
print_re_exthdr_scn
| res | rtas_event_scn pointer for the extended header | |
| verbosity | verbose level of output |
| int print_re_hdr_scn | ( | struct rtas_event_scn * | res, | |
| int | verbosity | |||
| ) |
print_re_hdr_scn
| res | rtas_event_scn pointer for main RTAS event header | |
| verbosity | verbose level for output |
| int print_re_ibmdiag_scn | ( | struct rtas_event_scn * | res, | |
| int | verbosity | |||
| ) |
print_re_ibmdiag_scn
| res | rtas_event_scn pointer for IBM diagnostics log section | |
| verbosity | verbose level of output |
| int print_re_vend_specific_scn | ( | struct rtas_event_scn * | res, | |
| int | verbosity | |||
| ) |
print_re_vend_specific_scn
| res | rtas_event_scn to print | |
| verbosity | verbose level |
| int print_scn_title | ( | char * | fmt, | |
| ... | ||||
| ) |
print_scn_title
| fmt | string format for section title | |
| ... | additional args a la printf() |
| int re_print_generic | ( | char * | title, | |
| struct rtas_event_scn * | res, | |||
| int | verbosity | |||
| ) |
re_print_generic
| title | name of the section to be printed | |
| res | rtas_event_scn to print | |
| verbosity | verbose level |
| static char* rtas_error_type | ( | int | type | ) | [static] |
rtas_error_type
| type | RTAS event type |
NULL on unrecognized event type
| struct rtas_event_scn* rtas_get_event_exthdr_scn | ( | struct rtas_event * | re | ) | [read] |
rtas_get_event_exthdr_scn
| re | rtas_event pointer |
| struct rtas_event_scn* rtas_get_event_hdr_scn | ( | struct rtas_event * | re | ) | [read] |
rtas_get_event_hdr_scn
| re | rtas_event pointer |
| struct rtas_event_scn* rtas_get_ibmdiag_scn | ( | struct rtas_event * | re | ) | [read] |
rtas_get_ibmdiag_scn
| re | rtas_event pointer |
| int rtas_print | ( | char * | fmt, | |
| ... | ||||
| ) |
rtas_print
| fmt | string format a la printf() | |
| ... | additional args a la printf() |
| int rtas_print_event | ( | FILE * | stream, | |
| struct rtas_event * | re, | |||
| int | verbosity | |||
| ) |
rtas_print_event
| stream | output stream to print to | |
| re | rtas_event pointer to print out | |
| verbosity | verbose level of output |
| int rtas_print_raw_event | ( | FILE * | stream, | |
| struct rtas_event * | re | |||
| ) |
rtas_print_raw_event
| stream | ouput stream to write to | |
| re | rtas_event pointer |
| int rtas_print_scn | ( | FILE * | stream, | |
| struct rtas_event_scn * | res, | |||
| int | verbosity | |||
| ) |
rtas_print_scn
| stream | output stream to write to | |
| res | rtas_event_scn pointer to print | |
| verbosity | verbose level for output |
| int rtas_set_print_width | ( | int | width | ) |
rtas_set_print_width
| width | character width of output |
int line_offset = 0 [static] |
line_offset
FILE* ostream [static] |
ostream
int(* re_print_fns[])() [static] |
Initial value:
{
NULL,
print_re_hdr_scn,
print_re_exthdr_scn,
print_re_epow_scn,
print_re_io_scn,
print_re_cpu_scn,
print_re_ibmdiag_scn,
print_re_mem_scn,
print_re_post_scn,
print_re_ibmsp_scn,
print_re_vend_specific_scn,
print_re_main_a_scn,
print_re_main_b_scn,
print_re_dump_scn,
print_re_lri_scn,
print_re_mtms_scn,
print_re_src_scn,
print_re_src_scn,
print_re_src_subscn,
print_re_fru_scn,
print_re_fru_subscn,
}
NOTE: the index of these print functions corresponds to the definitions for the rtas event sections from librtasevent.h. Changes need to be made in both places to avoid breaking librtasevent.
char* rtas_disposition_names[] [static] |
Initial value:
{
"Fully Recovered", "Limited Recovery", "Not Recoverd", "(4)"
}
| char* rtas_entity_names[] |
Initial value:
{
"Unknown", "CPU", "PCI", "ISA", "Memory", "Power Management",
"Hot Plug", "(7)", "(8)", "(9)", "(10)", "(11)", "(12)",
"(13)", "(14)", "(15)"
}
char* rtas_event_error_type[] [static] |
Initial value:
{
"Unknown", "Retry", "TCE Error", "Internal Device Failure",
"Timeout", "Data Parity", "Address Parity", "Cache Parity",
"Address Invalid", "ECC Uncorrected", "ECC Corrupted",
}
Not all of the event types are covered in this array, please bounds check before using.
int rtas_print_width = 80 [static] |
rtas_print_width
The default output of librtasevent is 80 characters wide. This can be adjusted via the rtas_set_print_width() call.
char* rtas_severity_names[] [static] |
Initial value:
{
"No Error", "Event", "Warning", "Error Sync", "Error",
"Fatal", "Already Reported", "(7)"
}
1.5.3