projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
configure: Do not reject Linux 3.0 at configure time.
[openvswitch]
/
lib
/
vlog.h
diff --git
a/lib/vlog.h
b/lib/vlog.h
index bbc00ad2527a015919d564840a08523de29a99bf..1a11f598e00935772b2e1960ca422420b7d94151 100644
(file)
--- a/
lib/vlog.h
+++ b/
lib/vlog.h
@@
-92,6
+92,7
@@
struct vlog_module {
#if USE_LINKER_SECTIONS
#define VLOG_DEFINE_MODULE(MODULE) \
VLOG_DEFINE_MODULE__(MODULE) \
#if USE_LINKER_SECTIONS
#define VLOG_DEFINE_MODULE(MODULE) \
VLOG_DEFINE_MODULE__(MODULE) \
+ extern struct vlog_module *vlog_module_ptr_##MODULE; \
struct vlog_module *vlog_module_ptr_##MODULE \
__attribute__((section("vlog_modules"))) = &VLM_##MODULE
#else
struct vlog_module *vlog_module_ptr_##MODULE \
__attribute__((section("vlog_modules"))) = &VLM_##MODULE
#else
@@
-111,6
+112,7
@@
struct vlog_rate_limit {
unsigned int tokens; /* Current number of tokens. */
time_t last_fill; /* Last time tokens added. */
time_t first_dropped; /* Time first message was dropped. */
unsigned int tokens; /* Current number of tokens. */
time_t last_fill; /* Last time tokens added. */
time_t first_dropped; /* Time first message was dropped. */
+ time_t last_dropped; /* Time of most recent message drop. */
unsigned int n_dropped; /* Number of messages dropped. */
};
unsigned int n_dropped; /* Number of messages dropped. */
};
@@
-129,6
+131,7
@@
struct vlog_rate_limit {
0, /* tokens */ \
0, /* last_fill */ \
0, /* first_dropped */ \
0, /* tokens */ \
0, /* last_fill */ \
0, /* first_dropped */ \
+ 0, /* last_dropped */ \
0, /* n_dropped */ \
}
0, /* n_dropped */ \
}
@@
-222,8
+225,8
@@
void vlog_rate_limit(const struct vlog_module *, enum vlog_level,
/* Command line processing. */
#define VLOG_OPTION_ENUMS OPT_LOG_FILE
#define VLOG_LONG_OPTIONS \
/* Command line processing. */
#define VLOG_OPTION_ENUMS OPT_LOG_FILE
#define VLOG_LONG_OPTIONS \
- {"verbose", optional_argument,
0
, 'v'}, \
- {"log-file", optional_argument,
0
, OPT_LOG_FILE}
+ {"verbose", optional_argument,
NULL
, 'v'}, \
+ {"log-file", optional_argument,
NULL
, OPT_LOG_FILE}
#define VLOG_OPTION_HANDLERS \
case 'v': \
vlog_set_verbosity(optarg); \
#define VLOG_OPTION_HANDLERS \
case 'v': \
vlog_set_verbosity(optarg); \
@@
-258,6
+261,7
@@
void vlog_usage(void);
} while (0)
#define VLOG_DEFINE_MODULE__(MODULE) \
} while (0)
#define VLOG_DEFINE_MODULE__(MODULE) \
+ extern struct vlog_module VLM_##MODULE; \
struct vlog_module VLM_##MODULE = \
{ \
#MODULE, /* name */ \
struct vlog_module VLM_##MODULE = \
{ \
#MODULE, /* name */ \