[systemd-devel] [PATCH] localed: forward xkbcommon errors
Jan Synacek
jsynacek at redhat.com
Tue Dec 2 22:54:28 PST 2014
Lennart Poettering <lennart at poettering.net> writes:
> On Tue, 02.12.14 14:02, Jan Synacek (jsynacek at redhat.com) wrote:
>
>> The errors are prefixed with "libxkbcommon", because they are quite
>> confusing. With the prefix, we at least know where they come from.
>> ---
>> src/locale/localed.c | 15 +++++++++++----
>> 1 file changed, 11 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/locale/localed.c b/src/locale/localed.c
>> index 4e56382..ea54798 100644
>> --- a/src/locale/localed.c
>> +++ b/src/locale/localed.c
>> @@ -1011,10 +1011,16 @@ static int method_set_vc_keyboard(sd_bus *bus, sd_bus_message *m, void *userdata
>>
>> #ifdef HAVE_XKBCOMMON
>> static void log_xkb(struct xkb_context *ctx, enum xkb_log_level lvl, const char *format, va_list args) {
>> - /* suppress xkb messages for now */
>> + _cleanup_free_ char *fmt = NULL;
>> + sd_bus_error *e;
>> +
>> + if (asprintf(&fmt, "libxkbcommon: %s", format) < 0)
>> + (void) log_oom();
>> + e = xkb_context_get_user_data(ctx);
>> + bus_error_setfv(e, SD_BUS_ERROR_INVALID_ARGS, fmt, args);
>
> I thought the plan now was to log them at debug level but not return
> them to the client?
>
> Also, strappenda()!
>
> Lennart
Please, disregard this patch submission. For some reason, I sent a
wrong version.
Sorry,
--
Jan Synacek
Software Engineer, Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141203/7a26416f/attachment.sig>
More information about the systemd-devel
mailing list