public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@mail.ru>
To: linux-kernel@vger.kernel.org
Subject: UNICODE ioctls on background console
Date: Fri, 2 Jan 2004 22:33:12 +0300	[thread overview]
Message-ID: <200401022233.12115.arvidjaar@mail.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

Why are those ioctls forcibly applied to foreground console only? This makes 
--tty option for consolechars non-functional and prevents console 
initialization (for non-ASCII charsets) as part of system startup (or as part 
of getty) because it works only when called on currently active console.

I'm running with the following patch without any ill effects nor can I see any 
harm looking in code.

Any reason it cannot be applied?

regards

-andrey

[-- Attachment #2: 2.6.0-unicode_background_cons.patch --]
[-- Type: text/x-diff, Size: 1394 bytes --]

--- ../tmp/linux-2.6.0/drivers/char/vt_ioctl.c	2003-12-18 05:59:06.000000000 +0300
+++ linux-2.6.0/drivers/char/vt_ioctl.c	2004-01-02 18:38:38.000000000 +0300
@@ -332,7 +332,7 @@ do_fontx_ioctl(int cmd, struct consolefo
 }
 
 static inline int 
-do_unimap_ioctl(int cmd, struct unimapdesc *user_ud,int perm)
+do_unimap_ioctl(int cmd, struct unimapdesc *user_ud,int perm, unsigned int console)
 {
 	struct unimapdesc tmp;
 	int i = 0; 
@@ -348,9 +348,9 @@ do_unimap_ioctl(int cmd, struct unimapde
 	case PIO_UNIMAP:
 		if (!perm)
 			return -EPERM;
-		return con_set_unimap(fg_console, tmp.entry_ct, tmp.entries);
+		return con_set_unimap(console, tmp.entry_ct, tmp.entries);
 	case GIO_UNIMAP:
-		return con_get_unimap(fg_console, tmp.entry_ct, &(user_ud->entry_ct), tmp.entries);
+		return con_get_unimap(console, tmp.entry_ct, &(user_ud->entry_ct), tmp.entries);
 	}
 	return 0;
 }
@@ -966,13 +966,13 @@ int vt_ioctl(struct tty_struct *tty, str
 			return -EPERM;
 		i = copy_from_user(&ui, (void *)arg, sizeof(struct unimapinit));
 		if (i) return -EFAULT;
-		con_clear_unimap(fg_console, &ui);
+		con_clear_unimap(console, &ui);
 		return 0;
 	      }
 
 	case PIO_UNIMAP:
 	case GIO_UNIMAP:
-		return do_unimap_ioctl(cmd, (struct unimapdesc *)arg, perm);
+		return do_unimap_ioctl(cmd, (struct unimapdesc *)arg, perm, console);
 
 	case VT_LOCKSWITCH:
 		if (!capable(CAP_SYS_TTY_CONFIG))

             reply	other threads:[~2004-01-02 19:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-02 19:33 Andrey Borzenkov [this message]
2004-01-02 21:27 ` UNICODE ioctls on background console Andries Brouwer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200401022233.12115.arvidjaar@mail.ru \
    --to=arvidjaar@mail.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox