#include <stdarg.h>#include <unistd.h>#include <signal.h>#include <execinfo.h>#include <stdio.h>#include <stdlib.h>#include <errno.h>#include <sstream>#include <iomanip>#include <string>#include <ycp/y2log.h>#include <ycp/ExecutionEnvironment.h>#include "Y2Component.h"#include "Y2ErrorComponent.h"#include "Y2ComponentBroker.h"#include <YCP.h>#include <ycp/Parser.h>#include <ycp/pathsearch.h>#include "exitcodes.h"#include <blocxx/BLOCXX_config.h>#include <blocxx/Logger.hpp>#include <blocxx/LogMessage.hpp>#include <blocxx/LogConfig.hpp>Classes | |
| class | YaSTLogger |
| struct | logger_initializer |
Defines | |
| #define | _GNU_SOURCE |
| #define | MAX_YCP_ERROR_EXIT_SYMBOLS 2 |
| number of symbols that are handled as error codes | |
Functions | |
| static void | print_usage () |
| static void | print_help () |
| static void | print_error (const char *,...) __attribute__((format(printf |
| static void static bool | has_parens (const char *arg) |
| static void | signal_log_to_fd (int fd, const char *cs) |
| static void | signal_log (const char *cs) |
| static bool | signal_log_ss (const string &s) |
| static void | signal_log_timestamp () |
| static void | signal_log_stored_debug () |
| void | signal_log_backtrace () |
| void | signal_log_open () |
| void | signal_handler (int sig) |
| void | parse_client_and_options (int argc, char **argv, int &arg, char *&client_name, YCPList &arglist) |
| void | parse_server_and_options (int argc, char **argv, int &arg, char *&server_name, YCPList &preload) |
| int | main (int argc, char **argv) |
Variables | |
| const char * | ycp_error_exit_symbols [MAX_YCP_ERROR_EXIT_SYMBOLS] |
| symbol names that are handled as error codes when returned by the client | |
| ExecutionEnvironment | ee |
| static const char * | progname = "genericfrontend" |
| fallback name of the program | |
| int | signal_log_fd |
| static logger_initializer | initialize_logger |
| #define _GNU_SOURCE |
| #define MAX_YCP_ERROR_EXIT_SYMBOLS 2 |
| static bool has_parens | ( | const char * | arg | ) | [static] |
Referenced by parse_client_and_options(), and parse_server_and_options().
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
References YCPPathSearch::addPath(), YCPPathSearch::Client, YCPList::contains(), Y2ComponentBroker::createClient(), Y2ComponentBroker::createServer(), Y2Component::doActualWork(), Y2Component::evaluate(), Y2ComponentBroker::getNamespaceComponent(), YCPPathSearch::Include, YCPPathSearch::initialize(), YCPElement::isNull(), MAX_YCP_ERROR_EXIT_SYMBOLS, YCPPathSearch::Module, parse_client_and_options(), parse_server_and_options(), print_error(), print_help(), print_usage(), progname, Y2ComponentBroker::registerNamespaceException(), Y2Component::result(), YCPPathSearch::searchListBegin(), YCPPathSearch::searchListEnd(), set_log_conf(), set_log_filename(), Y2Component::setServerOptions(), signal_handler(), YCPList::size(), YCPList::value(), y2debug, y2milestone, YAST_CLIENTRESULT, YAST_FEWARGUMENTS, YAST_OK, YAST_OPTIONERROR, and ycp_error_exit_symbols.
| void parse_client_and_options | ( | int | argc, | |
| char ** | argv, | |||
| int & | arg, | |||
| char *& | client_name, | |||
| YCPList & | arglist | |||
| ) |
References YCPList::add(), has_parens(), YCPElement::isNull(), Parser::parse(), parser, print_error(), print_usage(), YAST_FEWARGUMENTS, and YAST_OPTIONERROR.
Referenced by main().
| void parse_server_and_options | ( | int | argc, | |
| char ** | argv, | |||
| int & | arg, | |||
| char *& | server_name, | |||
| YCPList & | preload | |||
| ) |
References YCPList::add(), has_parens(), Parser::parse(), parser, print_error(), print_usage(), YAST_FEWARGUMENTS, and YAST_OPTIONERROR.
Referenced by main().
| static void print_error | ( | const char * | format, | |
| ... | ||||
| ) | [static] |
References y2error.
Referenced by main(), parse_client_and_options(), and parse_server_and_options().
| static void print_help | ( | ) | [static] |
References progname.
| static void print_usage | ( | ) | [static] |
Referenced by main(), parse_client_and_options(), and parse_server_and_options().
| void signal_handler | ( | int | sig | ) |
| static void signal_log | ( | const char * | cs | ) | [static] |
References signal_log_fd, and signal_log_to_fd().
Referenced by signal_handler(), signal_log_backtrace(), signal_log_ss(), signal_log_stored_debug(), and signal_log_timestamp().
| void signal_log_backtrace | ( | ) |
| void signal_log_open | ( | ) |
| static bool signal_log_ss | ( | const string & | s | ) | [static] |
| static void signal_log_stored_debug | ( | ) | [static] |
References blanik, LogTail::for_each(), signal_log(), and signal_log_ss().
Referenced by signal_handler().
| static void signal_log_timestamp | ( | ) | [static] |
| static void signal_log_to_fd | ( | int | fd, | |
| const char * | cs | |||
| ) | [static] |
Referenced by signal_handler(), and signal_log().
logger_initializer initialize_logger [static] |
const char* progname = "genericfrontend" [static] |
| int signal_log_fd |
Referenced by signal_handler(), signal_log(), signal_log_backtrace(), and signal_log_open().
| const char* ycp_error_exit_symbols[MAX_YCP_ERROR_EXIT_SYMBOLS] |
Initial value:
{
"abort",
"cancel"
}
Referenced by main().
1.5.9