OVS_CHECK_VALGRIND
OVS_CHECK_TTY_LOCK_DIR
OVS_CHECK_SOCKET_LIBS
-OVS_CHECK_FAULT_LIBS
AC_CHECK_FUNCS([strsignal])
lib/dynamic-string.h \
lib/fatal-signal.c \
lib/fatal-signal.h \
- lib/fault.c \
- lib/fault.h \
lib/flow.c \
lib/flow.h \
lib/hash.c \
+++ /dev/null
-/*
- * Copyright (c) 2008, 2009 Nicira Networks.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <config.h>
-#include "fault.h"
-#include <dlfcn.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <signal.h>
-#include "util.h"
-
-#include "vlog.h"
-#define THIS_MODULE VLM_fault
-
-static void
-fault_handler(int sig_nr)
-{
- VLOG_EMER("Caught signal %d.", sig_nr);
- log_backtrace();
- fflush(stdout);
- fflush(stderr);
-
- signal(sig_nr, SIG_DFL);
- raise(sig_nr);
-}
-
-void
-log_backtrace(void)
-{
- /* During the loop:
-
- frame[0] points to the next frame.
- frame[1] points to the return address. */
- void **frame;
- for (frame = __builtin_frame_address(0);
- frame != NULL && frame[0] != NULL;
- frame = frame[0]) {
- Dl_info addrinfo;
- if (!dladdr(frame[1], &addrinfo) || !addrinfo.dli_sname) {
- fprintf(stderr, " 0x%08"PRIxPTR"\n", (uintptr_t) frame[1]);
- } else {
- fprintf(stderr, " 0x%08"PRIxPTR" (%s+0x%tx)\n",
- (uintptr_t) frame[1], addrinfo.dli_sname,
- (char *) frame[1] - (char *) addrinfo.dli_saddr);
- }
- }
- fflush(stderr);
-}
-
-void
-register_fault_handlers(void)
-{
- signal(SIGABRT, fault_handler);
- signal(SIGBUS, fault_handler);
- signal(SIGFPE, fault_handler);
- signal(SIGILL, fault_handler);
- signal(SIGSEGV, fault_handler);
-}
+++ /dev/null
-/*
- * Copyright (c) 2008 Nicira Networks.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef FAULT_H
-#define FAULT_H 1
-
-void register_fault_handlers(void);
-void log_backtrace(void);
-
-#endif /* fault.h */
VLOG_MODULE(ezio_term)
VLOG_MODULE(fail_open)
VLOG_MODULE(fatal_signal)
-VLOG_MODULE(fault)
VLOG_MODULE(flow)
VLOG_MODULE(in_band)
VLOG_MODULE(jsonrpc)
AC_DEFINE([HAVE_OPENSSL], [1], [Define to 1 if OpenSSL is installed.])
fi])
-dnl Checks for libraries needed by lib/fault.c.
-AC_DEFUN([OVS_CHECK_FAULT_LIBS],
- [AC_CHECK_LIB([dl], [dladdr], [FAULT_LIBS=-ldl])
- AC_SUBST([FAULT_LIBS])])
-
dnl Checks for libraries needed by lib/socket-util.c.
AC_DEFUN([OVS_CHECK_SOCKET_LIBS],
[AC_CHECK_LIB([socket], [connect])
# ovsdb-server
sbin_PROGRAMS += ovsdb/ovsdb-server
ovsdb_ovsdb_server_SOURCES = ovsdb/ovsdb-server.c
-ovsdb_ovsdb_server_LDADD = \
- ovsdb/libovsdb.a \
- lib/libopenvswitch.a \
- $(FAULT_LIBS) \
- $(SSL_LIBS)
+ovsdb_ovsdb_server_LDADD = ovsdb/libovsdb.a lib/libopenvswitch.a $(SSL_LIBS)
# ovsdb-server.1
man_MANS += ovsdb/ovsdb-server.1
DISTCLEANFILES += ovsdb/ovsdb-server.1
#include "column.h"
#include "command-line.h"
#include "daemon.h"
-#include "fault.h"
#include "file.h"
#include "json.h"
#include "jsonrpc.h"
int retval;
set_program_name(argv[0]);
- register_fault_handlers();
time_init();
vlog_init();
signal(SIGPIPE, SIG_IGN);
noinst_PROGRAMS += tests/test-dhcp-client
tests_test_dhcp_client_SOURCES = tests/test-dhcp-client.c
-tests_test_dhcp_client_LDADD = lib/libopenvswitch.a $(FAULT_LIBS)
+tests_test_dhcp_client_LDADD = lib/libopenvswitch.a
noinst_PROGRAMS += tests/test-stp
tests_test_stp_SOURCES = tests/test-stp.c
#include "command-line.h"
#include "dhcp.h"
#include "fatal-signal.h"
-#include "fault.h"
#include "poll-loop.h"
#include "util.h"
#include "vlog.h"
int error;
set_program_name(argv[0]);
- register_fault_handlers();
vlog_init();
parse_options(argc, argv);
utilities_ovs_appctl_LDADD = lib/libopenvswitch.a
utilities_ovs_controller_SOURCES = utilities/ovs-controller.c
-utilities_ovs_controller_LDADD = lib/libopenvswitch.a $(FAULT_LIBS) $(SSL_LIBS)
+utilities_ovs_controller_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
utilities_ovs_discover_SOURCES = utilities/ovs-discover.c
utilities_ovs_discover_LDADD = lib/libopenvswitch.a
utilities_ovs_dpctl_SOURCES = utilities/ovs-dpctl.c
-utilities_ovs_dpctl_LDADD = lib/libopenvswitch.a $(FAULT_LIBS)
+utilities_ovs_dpctl_LDADD = lib/libopenvswitch.a
utilities_ovs_kill_SOURCES = utilities/ovs-kill.c
utilities_ovs_kill_LDADD = lib/libopenvswitch.a
utilities_ovs_ofctl_SOURCES = utilities/ovs-ofctl.c
-utilities_ovs_ofctl_LDADD = lib/libopenvswitch.a $(FAULT_LIBS) $(SSL_LIBS)
+utilities_ovs_ofctl_LDADD = lib/libopenvswitch.a $(SSL_LIBS)
utilities_ovs_openflowd_SOURCES = utilities/ovs-openflowd.c
utilities_ovs_openflowd_LDADD = \
ofproto/libofproto.a \
lib/libopenvswitch.a \
- $(FAULT_LIBS) \
$(SSL_LIBS)
utilities_ovs_vsctl_SOURCES = utilities/ovs-vsctl.c vswitchd/vswitch-idl.c
-utilities_ovs_vsctl_LDADD = lib/libopenvswitch.a $(FAULT_LIBS)
+utilities_ovs_vsctl_LDADD = lib/libopenvswitch.a
utilities_ovs_wdt_SOURCES = utilities/ovs-wdt.c
#include "command-line.h"
#include "compiler.h"
#include "daemon.h"
-#include "fault.h"
#include "learning-switch.h"
#include "ofpbuf.h"
#include "openflow/openflow.h"
int i;
set_program_name(argv[0]);
- register_fault_handlers();
time_init();
vlog_init();
parse_options(argc, argv);
#include "daemon.h"
#include "dirs.h"
#include "dpif.h"
-#include "fault.h"
#include "leak-checker.h"
#include "list.h"
#include "netdev.h"
struct netflow_options nf_options;
set_program_name(argv[0]);
- register_fault_handlers();
time_init();
vlog_init();
parse_options(argc, argv, &s);
vswitchd_ovs_vswitchd_LDADD = \
ofproto/libofproto.a \
lib/libopenvswitch.a \
- $(FAULT_LIBS) \
$(SSL_LIBS)
vswitchd_ovs_brcompatd_SOURCES = \
vswitchd/vswitch-idl.c \
vswitchd/vswitch-idl.h
-vswitchd_ovs_brcompatd_LDADD = \
- lib/libopenvswitch.a \
- $(FAULT_LIBS)
+vswitchd_ovs_brcompatd_LDADD = lib/libopenvswitch.a
EXTRA_DIST += \
vswitchd/ovs-vswitchd.8.in \
#include "dirs.h"
#include "dynamic-string.h"
#include "fatal-signal.h"
-#include "fault.h"
#include "leak-checker.h"
#include "netdev.h"
#include "netlink.h"
int retval;
set_program_name(argv[0]);
- register_fault_handlers();
time_init();
vlog_init();
vlog_set_levels(VLM_ANY_MODULE, VLF_CONSOLE, VLL_WARN);
#include "compiler.h"
#include "daemon.h"
#include "dpif.h"
-#include "fault.h"
#include "leak-checker.h"
#include "netdev.h"
#include "ovsdb-idl.h"
int retval;
set_program_name(argv[0]);
- register_fault_handlers();
time_init();
vlog_init();
remote = parse_options(argc, argv);