ppc64-diag
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <librtas.h>
#include <sys/types.h>
#include <sys/wait.h>
#include "utils.h"
#include "rtas_errd.h"
Macros | |
#define | CMD_LSVPD "/usr/sbin/lsvpd" |
Functions | |
void | free_diag_vpd (struct event *event) |
static int | lsvpd_init (FILE **fp, pid_t *cpid) |
static int | lsvpd_term (FILE *fp, pid_t *cpid) |
static int | lsvpd_read (struct event *event, FILE *fp) |
int | get_diag_vpd (struct event *event, char *phyloc) |
char * | get_dt_status (char *dev) |
int | is_integrated (char *phy_loc) |
This function determines if the device is an integrated device or not. More... | |
void | get_base_loc (char *phyloc, char *base) |
char * | diag_get_fru_pn (struct event *event, char *phyloc) |
Variables | |
char | target_status [80] |
Copyright (C) 2005, 2008 IBM Corporation
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define CMD_LSVPD "/usr/sbin/lsvpd" |
Referenced by lsvpd_init().
char* diag_get_fru_pn | ( | struct event * | event, |
char * | phyloc | ||
) |
diag_fru_pn_by_ploc
Returns the FRU part number from VPD, as defined by the "FN" vpd keyword, for the FRU given by the physical location code
RETURNS: 0 if not found information. 1 if found information. -1 if error found during search
References event::diag_vpd, diag_vpd::fn, get_base_loc(), get_diag_vpd(), and is_integrated().
Referenced by add_more_descrs(), and set_srn_and_callouts().
void free_diag_vpd | ( | struct event * | event | ) |
References event::diag_vpd, diag_vpd::ds, diag_vpd::fn, diag_vpd::se, diag_vpd::sn, diag_vpd::tm, and diag_vpd::yl.
Referenced by get_diag_vpd(), lsvpd_read(), and read_rtas_events().
void get_base_loc | ( | char * | phyloc, |
char * | base | ||
) |
get_base_loc
FUNCTION: Reduce the given location code to the base physical FRU, thus removing the extended functional location information. Currently this works for CHRP physical location codes, but will need to updated for converged location codes.
Referenced by diag_get_fru_pn().
int get_diag_vpd | ( | struct event * | event, |
char * | phyloc | ||
) |
References dbg, event::diag_vpd, free_diag_vpd(), lsvpd_init(), lsvpd_read(), lsvpd_term(), restore_sigchld_default(), setup_sigchld_handler(), and diag_vpd::yl.
Referenced by diag_get_fru_pn().
char* get_dt_status | ( | char * | dev | ) |
References dbg, log_msg(), and target_status.
Referenced by process_pre_v6().
int is_integrated | ( | char * | phy_loc | ) |
is_integrated RETURNS: 0 - Not integrated 1 - Is integrated -1 - System error obtaining data
References dbg.
Referenced by diag_get_fru_pn().
|
static |
References CMD_LSVPD, and dbg.
Referenced by get_diag_vpd().
|
static |
References dbg, event::diag_vpd, diag_vpd::ds, diag_vpd::fn, free_diag_vpd(), diag_vpd::se, diag_vpd::sn, diag_vpd::tm, and diag_vpd::yl.
Referenced by get_diag_vpd().
|
static |
Referenced by get_diag_vpd().
char target_status[80] |
Referenced by get_dt_status().