summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2019-08-06 17:38:40 +0300
committerMarius Vlad <marius.vlad@collabora.com>2019-08-19 12:52:29 +0300
commite568488548e46cba5f7f48ce1ba6308bae14fc82 (patch)
treecf4f4d1d0280681ed75e3d195348ad2a87992301
parent843b238551be3fd4b770e9912a0e169491e5a419 (diff)
downloadweston-e568488548e46cba5f7f48ce1ba6308bae14fc82.tar.gz
compositor: Return the number of bytes written as to format properly
Otherwise 'log_extensions()' will not know how to properly format the data. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Reported-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-rw-r--r--compositor/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/compositor/main.c b/compositor/main.c
index 65c7dca3..13ca00f3 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -200,22 +200,22 @@ static int
vlog(const char *fmt, va_list ap)
{
char timestr[128];
+ int len = 0;
if (weston_log_scope_is_enabled(log_scope)) {
- weston_log_scope_printf(log_scope, "%s ",
- weston_log_timestamp(timestr,
- sizeof(timestr)));
- weston_log_scope_vprintf(log_scope, fmt, ap);
+ len = weston_log_scope_printf(log_scope, "%s ",
+ weston_log_timestamp(timestr,
+ sizeof timestr));
+ len += weston_log_scope_vprintf(log_scope, fmt, ap);
}
- return 0;
+ return len;
}
static int
vlog_continue(const char *fmt, va_list argp)
{
- weston_log_scope_vprintf(log_scope, fmt, argp);
- return 0;
+ return weston_log_scope_vprintf(log_scope, fmt, argp);
}
static const char *