Bug#341596: Bug#341956: [PATCH] loadkeys -m shouldn't need console.
On Wed, Mar 29, 2006 at 03:43:18PM +1100, Peter Chubb wrote:
>
> This bug really started to annoy me when I couldn't cross-compile ARM
> kernels as a batch job...
As noticed by Frans, this post is about #341956 and not #341596, please
respect the Reply-To.
Peter, thanks for your patch. It is included here to reach #341956.
> The problem is the unicode patch, 430_read_keymaps_fmt.patch
> which unconditionally tries to work out if the current console is in
> unicode mode. Appended is a patch that makes this conditional on not
> -m.
>
> diff -Nru ./console-tools-0.2.3/kbdtools/loadkeys.y ../build-tree.new/console-tools-0.2.3/kbdtools/loadkeys.y
> --- ./console-tools-0.2.3/kbdtools/loadkeys.y 2006-03-29 15:24:20.000000000 +1100
> +++ ../build-tree.new/console-tools-0.2.3/kbdtools/loadkeys.y 2006-03-29 15:23:42.000000000 +1100
> @@ -408,17 +408,18 @@
> }
> }
>
> - fd = get_console_fd(NULL);
> - if (!optu) {
> - if (ioctl(fd, KDGKBMODE, &mode)) {
> - perror("KDGKBMODE");
> - fprintf(stderr, _("loadkeys: error reading keyboard mode\n"));
> - exit(1);
> - }
> - if (mode == K_UNICODE)
> - set_charset("unicode");
> - }
> -
> + if (!optm) {
> + fd = get_console_fd(NULL);
> + if (!optu) {
> + if (ioctl(fd, KDGKBMODE, &mode)) {
> + perror("KDGKBMODE");
> + fprintf(stderr, _("loadkeys: error reading keyboard mode\n"));
> + exit(1);
> + }
> + if (mode == K_UNICODE)
> + set_charset("unicode");
> + }
> + }
> args = argv + optind - 1;
> /* set up the first input file, if any */
> yywrap();
Reply to: