diff options
author | Zoltan Kiss <zoltan.kiss@linaro.org> | 2015-02-03 19:19:38 +0000 |
---|---|---|
committer | Zoltan Kiss <zoltan.kiss@linaro.org> | 2015-07-09 18:41:16 +0100 |
commit | e96ecc923224b174d583c41c142c8a3ec717e927 (patch) | |
tree | 70cd063e3ed070be674cc562a5bc9d7e14ee444d | |
parent | 7c85e565251f1f8960e9ea106fd65840f5e0f032 (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.h | 2 | ||||
-rw-r--r-- | lib/vlog.c | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/openvswitch/vlog.h b/include/openvswitch/vlog.h index f6bb3abdd..70161b498 100644 --- a/include/openvswitch/vlog.h +++ b/include/openvswitch/vlog.h @@ -176,6 +176,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 09351a806..98ba06410 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -1201,6 +1201,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\ |