mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 01:48:00 +02:00
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>
This commit is contained in:
parent
843b238551
commit
e568488548
1 changed files with 7 additions and 7 deletions
|
|
@ -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 *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue