mirror of
https://github.com/openvswitch/ovs
synced 2025-09-01 06:45:17 +00:00
timeval: Make time_init() static and remove calls to it.
Since the timeval module now initializes itself on-demand, there is no longer any need to initialize it explicitly, or to provide an interface to do so.
This commit is contained in:
@@ -98,7 +98,6 @@ main(int argc, char *argv[])
|
||||
|
||||
proctitle_init(argc, argv);
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
parse_options(argc, argv);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
@@ -147,7 +147,6 @@ main(int argc, char *argv[])
|
||||
|
||||
proctitle_init(argc, argv);
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
parse_options(argc, argv);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
@@ -65,7 +65,7 @@ static void log_poll_interval(long long int last_wakeup,
|
||||
*
|
||||
* It is not necessary to call this function directly, because other time
|
||||
* functions will call it automatically, but it doesn't hurt. */
|
||||
void
|
||||
static void
|
||||
time_init(void)
|
||||
{
|
||||
static bool inited;
|
||||
|
@@ -44,7 +44,6 @@ BUILD_ASSERT_DECL(TYPE_IS_SIGNED(time_t));
|
||||
* much time will be wasted in signal handlers and calls to clock_gettime(). */
|
||||
#define TIME_UPDATE_INTERVAL 100
|
||||
|
||||
void time_init(void);
|
||||
void time_disable_restart(void);
|
||||
void time_enable_restart(void);
|
||||
void time_postfork(void);
|
||||
|
@@ -74,7 +74,6 @@ main(int argc, char *argv[])
|
||||
{
|
||||
proctitle_init(argc, argv);
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
parse_options(argc, argv);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
@@ -87,7 +87,6 @@ main(int argc, char *argv[])
|
||||
|
||||
proctitle_init(argc, argv);
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
process_init();
|
||||
|
@@ -50,7 +50,6 @@ int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
parse_options(argc, argv);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
@@ -39,7 +39,6 @@ main(int argc OVS_UNUSED, char *argv[])
|
||||
int n = 0, errors = 0;
|
||||
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
|
||||
flows = stdin;
|
||||
|
@@ -44,7 +44,6 @@ main(int argc, char *argv[])
|
||||
{
|
||||
proctitle_init(argc, argv);
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
parse_options(argc, argv);
|
||||
run_command(argc - optind, argv + optind, all_commands);
|
||||
|
@@ -240,7 +240,6 @@ main(int argc, char *argv[])
|
||||
size_t i;
|
||||
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
|
||||
if (argc != 2) {
|
||||
ovs_fatal(0, "exactly one argument required; use \"%s help\" for help",
|
||||
|
@@ -59,7 +59,6 @@ int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
parse_options(argc, argv);
|
||||
run_command(argc - optind, argv + optind, all_commands);
|
||||
|
@@ -93,7 +93,6 @@ main(int argc, char *argv[])
|
||||
{
|
||||
proctitle_init(argc, argv);
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
|
||||
if (argc != 2) {
|
||||
usage();
|
||||
|
@@ -401,7 +401,6 @@ int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
vlog_set_levels(VLM_ANY_MODULE, VLF_ANY_FACILITY, VLL_EMER);
|
||||
vlog_set_levels(VLM_ANY_MODULE, VLF_CONSOLE, VLL_DBG);
|
||||
|
@@ -42,7 +42,6 @@ main(int argc OVS_UNUSED, char *argv[])
|
||||
int error;
|
||||
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
vlog_set_levels(VLM_ANY_MODULE, VLF_ANY_FACILITY, VLL_DBG);
|
||||
|
||||
|
@@ -45,7 +45,6 @@ main(int argc, char *argv[])
|
||||
int i;
|
||||
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
|
||||
/* Parse command line and connect to target. */
|
||||
target = parse_command_line(argc, argv);
|
||||
|
@@ -90,7 +90,6 @@ main(int argc, char *argv[])
|
||||
|
||||
proctitle_init(argc, argv);
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
parse_options(argc, argv);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
@@ -77,7 +77,6 @@ main(int argc, char *argv[])
|
||||
|
||||
proctitle_init(argc, argv);
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
parse_options(argc, argv);
|
||||
|
||||
|
@@ -53,7 +53,6 @@ int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
parse_options(argc, argv);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2009 Nicira Networks.
|
||||
* Copyright (c) 2008, 2009, 2010 Nicira Networks.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,7 +46,6 @@ main(int argc, char *argv[])
|
||||
int i;
|
||||
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
parse_options(argc, argv);
|
||||
|
||||
|
@@ -74,7 +74,6 @@ int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
parse_options(argc, argv);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
@@ -96,7 +96,6 @@ main(int argc, char *argv[])
|
||||
|
||||
proctitle_init(argc, argv);
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
parse_options(argc, argv, &s);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
@@ -125,7 +125,6 @@ main(int argc, char *argv[])
|
||||
|
||||
set_program_name(argv[0]);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
time_init();
|
||||
vlog_init();
|
||||
vlog_set_levels(VLM_ANY_MODULE, VLF_CONSOLE, VLL_WARN);
|
||||
vlog_set_levels(VLM_reconnect, VLF_ANY_FACILITY, VLL_WARN);
|
||||
|
@@ -1294,7 +1294,6 @@ main(int argc, char *argv[])
|
||||
|
||||
proctitle_init(argc, argv);
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
vlog_set_levels(VLM_ANY_MODULE, VLF_CONSOLE, VLL_WARN);
|
||||
vlog_set_levels(VLM_reconnect, VLF_ANY_FACILITY, VLL_WARN);
|
||||
|
@@ -66,7 +66,6 @@ main(int argc, char *argv[])
|
||||
|
||||
proctitle_init(argc, argv);
|
||||
set_program_name(argv[0]);
|
||||
time_init();
|
||||
vlog_init();
|
||||
remote = parse_options(argc, argv);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
Reference in New Issue
Block a user