aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Kiss <zoltan.kiss@linaro.org>2015-02-03 19:19:38 +0000
committerZoltan Kiss <zoltan.kiss@linaro.org>2015-03-31 14:44:15 +0100
commit5d9c0922918c213e72a3b37723c2faa5d2cfb423 (patch)
tree7cf61cdd47d8b01f9e7362449e58a7c97ea2148f
parent7f3c3f299f8d9672dca1aabe47d13215d27a8cfe (diff)
vlog: add vlog_rate_limit_valist
We will need this for odp_override_log Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
-rw-r--r--include/openvswitch/vlog.h2
-rw-r--r--lib/vlog.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/include/openvswitch/vlog.h b/include/openvswitch/vlog.h
index 3f71e4bd7..71b34539a 100644
--- a/include/openvswitch/vlog.h
+++ b/include/openvswitch/vlog.h
@@ -170,6 +170,8 @@ OVS_NO_RETURN void vlog_abort_valist(const struct vlog_module *,
void vlog_rate_limit(const struct vlog_module *, enum vlog_level,
struct vlog_rate_limit *, const char *, ...)
OVS_PRINTF_FORMAT (4, 5);
+void vlog_rate_limit_valist(const struct vlog_module *, enum vlog_level,
+ struct vlog_rate_limit *, const char *, va_list);
/* Creates and initializes a global instance of a module named MODULE, and
* defines a static variable named THIS_MODULE that points to it, for use with
diff --git a/lib/vlog.c b/lib/vlog.c
index dbf46c5ab..654865605 100644
--- a/lib/vlog.c
+++ b/lib/vlog.c
@@ -1069,6 +1069,14 @@ vlog_rate_limit(const struct vlog_module *module, enum vlog_level level,
}
void
+vlog_rate_limit_valist(const struct vlog_module *module, enum vlog_level level,
+ struct vlog_rate_limit *rl, const char *message, va_list args)
+{
+ if (!vlog_should_drop(module, level, rl))
+ vlog_valist(module, level, message, args);
+}
+
+void
vlog_usage(void)
{
printf("\n\