librtasevent_src/rtas_srcfru.c File Reference

RTAS SRC/FRU sections routines. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include "librtasevent.h"
#include "rtas_event.h"
#include "rtas_src_codes.c"

Functions

static struct rtas_fru_hdrparse_fru_id_scn (struct rtas_event *re)
 Parse a FRU Identity Substructure.
static struct rtas_fru_hdrparse_fru_pe_scn (struct rtas_event *re)
 parse a FRU Power Enclosure Identity Substructure
static struct rtas_fru_hdrparse_fru_mr_scn (struct rtas_event *re)
 parse a FRU Manufacturing Replaceable Unit Substructure
int parse_src_scn (struct rtas_event *re)
 parse a version 6 rtas SRC section
struct rtas_src_scnrtas_get_src_scn (struct rtas_event *re)
 retrieve the RTAS src section for a RTAS event
static int print_fru_hdr (struct rtas_fru_hdr *fruhdr, int verbosity)
 print the contents of a FRU header
static int print_fru_priority (char priority)
 decode the FRU prority level and print a description of it.
static int print_fru_id_scn (struct rtas_fru_hdr *fruhdr, int verbosity)
static int print_fru_pe_scn (struct rtas_fru_hdr *fruhdr, int verbosity)
static int print_fru_mr_scn (struct rtas_fru_hdr *fruhdr, int verbosity)
int print_re_fru_scn (struct rtas_fru_scn *fru, int verbosity, int count)
 print the contents of an FRU section
int print_src_refcode (struct rtas_src_scn *src)
 print a detailed description of the SRC reference code
int print_re_src_scn (struct scn_header *shdr, int verbosity)
 print the contents of a SRC section


Detailed Description

Copyright (C) 2005 IBM Corporation Common Public License Version 1.0 (see COPYRIGHT)

Author:
Nathan Fontenot <nfont@austin.ibm.com>

Function Documentation

static struct rtas_fru_hdr* parse_fru_id_scn ( struct rtas_event re  )  [static, read]

static struct rtas_fru_hdr* parse_fru_mr_scn ( struct rtas_event re  )  [static, read]

parse_fru_mr_scn

Parameters:
re rtas_event pointer
Returns:
pointer to parsed rtas_fru_mr_scn, NULL on failure

References rtas_fru_mr_scn::fruhdr, rtas_fru_hdr::length, RE_FRU_HDR_OFFSET, RE_FRU_HDR_SZ, and rtas_copy().

Referenced by parse_src_scn().

static struct rtas_fru_hdr* parse_fru_pe_scn ( struct rtas_event re  )  [static, read]

parse_fru_pe_scn

Parameters:
re rtas_event pointer
Returns:
pointer to parsed rtas_fru_pe_scn, NULL on failure

References rtas_fru_pe_scn::fruhdr, rtas_fru_hdr::length, RE_FRU_HDR_OFFSET, RE_FRU_HDR_SZ, and rtas_copy().

Referenced by parse_src_scn().

int parse_src_scn ( struct rtas_event re  ) 

static int print_fru_hdr ( struct rtas_fru_hdr fruhdr,
int  verbosity 
) [static]

print_fru_hdr

Parameters:
fruhdr pointer to fru_hdr to print
verbosity verbose level
Returns:
the number of bytes printed

References rtas_fru_hdr::flags, rtas_fru_hdr::id, rtas_fru_hdr::length, PRNT_FMT_R, and rtas_print().

Referenced by print_fru_id_scn(), print_fru_mr_scn(), and print_fru_pe_scn().

static int print_fru_id_scn ( struct rtas_fru_hdr fruhdr,
int  verbosity 
) [static]

static int print_fru_mr_scn ( struct rtas_fru_hdr fruhdr,
int  verbosity 
) [static]

print_fru_mr_scn print the contents of a FRU Manufacturing Replaceable substructure

Parameters:
fruhdr pointer to the fru_hdr of the FRU MR section to print
verbosity verbose level
Returns:
the number of bytes printed

References frumr_num_callouts, fru_mru::id, rtas_fru_mr_scn::mrus, print_fru_hdr(), print_scn_title(), fru_mru::priority, and rtas_print().

Referenced by print_re_fru_scn().

static int print_fru_pe_scn ( struct rtas_fru_hdr fruhdr,
int  verbosity 
) [static]

print_fru_pe_scn print the contents of a FRU Power Enclosure substructure

Parameters:
fruhdr pointer to the fru_hdr of the FRU PE section to print
verbosity verbose level
Returns:
the number of bytes printed

References rtas_fru_pe_scn::pce_mtms, rtas_fru_pe_scn::pce_name, print_fru_hdr(), print_mtms(), print_scn_title(), and rtas_print().

Referenced by print_re_fru_scn().

static int print_fru_priority ( char  priority  )  [static]

print_fru_priority

Parameters:
priority 
Returns:
the number of bytes printed

References RTAS_FRU_PRIORITY_HIGH, RTAS_FRU_PRIORITY_LOW, RTAS_FRU_PRIORITY_MEDIUM, RTAS_FRU_PRIORITY_MEDIUM_A, RTAS_FRU_PRIORITY_MEDIUM_B, RTAS_FRU_PRIORITY_MEDIUM_C, and rtas_print().

Referenced by print_re_fru_scn().

int print_re_fru_scn ( struct rtas_fru_scn fru,
int  verbosity,
int  count 
)

int print_re_src_scn ( struct scn_header shdr,
int  verbosity 
)

int print_src_refcode ( struct rtas_src_scn src  ) 

print_src_refcode

Parameters:
src rtas_v6_src_scn pointer
Returns:
number of bytes written

References src_code::id, rtas_src_scn::primary_refcode, rtas_print(), and src_codes.

Referenced by print_re_src_scn().

struct rtas_src_scn* rtas_get_src_scn ( struct rtas_event re  )  [read]

rtas_get_src_scn

Parameters:
re rtas_event pointer
Returns:
rtas_event_scn pointer for a SRC section

References get_re_scn(), and RTAS_PSRC_SCN.


Generated on Sat Jun 7 04:46:32 2008 for librtasevent by  doxygen 1.5.5