ppc64-diag
|
Main entry point for rtas_errd. More...
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <getopt.h>
#include <time.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <librtas.h>
#include "rtas_errd.h"
#include "platform.h"
Functions | |
static void | daemonize (void) |
daemonize rtas_errd More... | |
int | handle_rtas_event (struct event *event) |
Main routine for processing RTAS events. More... | |
int | read_rtas_events () |
Main routine to retrieve RTAS events from the kernel. More... | |
static void | print_usage (char *argv0) |
int | main (int argc, char *argv[]) |
Variables | |
int | debug = 0 |
Debug level to run at for rtas_errd daemon. More... | |
const char * | db_dir = NULL |
struct servicelog * | slog = NULL |
servicelog struct for libservicelog use More... | |
static struct option | longopts [] |
Copyright (C) 2004 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.
|
static |
daemonize Convert the rtas_errd process to a daemon.
Referenced by main().
int handle_rtas_event | ( | struct event * | event | ) |
handle_rtas_event
event | RTAS event structure to be handled |
References check_eeh(), check_epow(), check_platform_dump(), dbg, event::flags, handle_hotplug_event(), handle_prrn_event(), handle_resource_dealloc(), log_event(), log_msg(), platform_log, platform_log_write(), print_rtas_event(), process_pre_v6(), process_v6(), RE_ALREADY_REPORTED, RE_PREDICTIVE, RE_RECOVERED_ERROR, event::rtas_event, event::rtas_hdr, and event::seq_num.
Referenced by read_rtas_events(), and update_rtas_msgs().
int main | ( | int | argc, |
char * | argv[] | ||
) |
main
The main purpose of main() for the rtas_errd daemon is to parse any command line options to the daemon, setup any signal handlers and initialize all files needed for operation.
References cfg_log(), check_scanlog_dump(), close_files(), config_file, daemonize(), dbg, debug, diag_cfg(), epow_status_file, epow_timer_handler(), init_files(), log_msg(), longopts, messages_log, optarg, platform_log, print_usage(), proc_error_log1, proc_error_log2, read_rtas_events(), RTAS_ERRD_ARGS, rtas_errd_log, setup_sigchld_handler(), sighup_handler(), slog, TOKEN_PLATDUMP_MAXSIZE, and update_rtas_msgs().
|
static |
References config_file, epow_status_file, platform_log, and rtas_errd_log.
Referenced by main().
int read_rtas_events | ( | ) |
read_rtas_event Responsible for reading RTAS events from the kernel (via /proc) and calling handle_rtas_event() to process the event.
References cfg_log(), d_cfg, dbg, diag_cfg(), event::event_buf, ppc64_diag_config::flags, free_diag_vpd(), handle_rtas_event(), event::loc_codes, log_msg(), RE_CFG_RECEIVED_SIGHUP, RE_CFG_RECFG_SAFE, RE_SCANLOG_AVAIL, read_proc_error_log(), RTAS_ERROR_LOG_MAX, event::rtas_event, event::rtas_hdr, scanlog, and event::seq_num.
Referenced by main().
const char* db_dir = NULL |
debug = 0 |
Referenced by _dbg(), init_files(), and main().
|
static |
Referenced by main().
slog = NULL |
Referenced by log_event(), and main().