On Tue, 11.11.14 13:29, Jan Synacek (jsyna...@redhat.com) wrote:
> >> Hmm, reading the file over and over and over again sounds less than
> >> ideal. Maybe we should intrdouce a struct here and then make
> >> xkb_get_keymaps() return an array of structs really?
> >
> > That sounds ok, I'll see wha
On Tue, 11.11.14 10:03, Jan Synacek (jsyna...@redhat.com) wrote:
> >> +r = xkb_validate_keymaps(model, layout, variant, options,
> >> &msg);
> >> +if (r < 0) {
> >> +log_error("Failed to validate X11 keyboard
> >> layout: %s", strerror(-r))
On Tue, 11.11.14 13:34, Jan Synacek (jsyna...@redhat.com) wrote:
> >> +r = strv_extend(list, l);
> >> +if (r < 0)
> >> +return log_oom();
> >
> > I think, while we are at it, this should really be reworked to use
> > GREEDY_REALLOC. See strv_
Lennart Poettering writes:
> On Tue, 04.11.14 12:05, Jan Synacek (jsyna...@redhat.com) wrote:
>
> One more addition:
>
>> +}
>> +
>> +int xkb_get_keymaps(char ***list, enum keymap_state look_for, const char
>> *layout_prefix)
>> +{
>> +_cleanup_fclose_ FILE *f;
>> +char line[LINE_
Jan Synacek writes:
> Lennart Poettering writes:
>> On Tue, 04.11.14 12:05, Jan Synacek (jsyna...@redhat.com) wrote:
>>> +int xkb_validate_keymaps(const char *model,
>>> + const char *layouts_arg,
>>> + const char *variants_arg,
>>> +
Lennart Poettering writes:
> On Tue, 04.11.14 12:05, Jan Synacek (jsyna...@redhat.com) wrote:
>
>> diff --git a/src/locale/localectl.c b/src/locale/localectl.c
>> index d4a2d29..8f9e4da 100644
>> --- a/src/locale/localectl.c
>> +++ b/src/locale/localectl.c
>> @@ -46,6 +46,7 @@
>> #include "virt.h
On Tue, 04.11.14 12:05, Jan Synacek (jsyna...@redhat.com) wrote:
One more addition:
> +}
> +
> +int xkb_get_keymaps(char ***list, enum keymap_state look_for, const char
> *layout_prefix)
> +{
> +_cleanup_fclose_ FILE *f;
> +char line[LINE_MAX];
> +enum keymap_state state
On Tue, 04.11.14 12:05, Jan Synacek (jsyna...@redhat.com) wrote:
> diff --git a/src/locale/localectl.c b/src/locale/localectl.c
> index d4a2d29..8f9e4da 100644
> --- a/src/locale/localectl.c
> +++ b/src/locale/localectl.c
> @@ -46,6 +46,7 @@
> #include "virt.h"
> #include "fileio.h"
> #include
Try to validate the input similarly to how setxkbmap does it. Multiple
layouts and variants can be specified, separated by a comma. Variants
can also be left out, meaning that the user doesn't want any particular
variant for the respective layout.
Variants are validated respectively to their layou
As mentioned in [1], it would probably be better if the validation
errors were just warnings, but I'm not sure if that can be achieved
over dbus.
[1] http://lists.freedesktop.org/archives/systemd-devel/2014-October/024129.html
Jan Synacek (1):
localed: validate set-x11-keymap input
Makefile.a
10 matches
Mail list logo