UNICODE ioctls on background console
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
drivers/char/vt_ioctl.c renamed from tmp/linux-2.6.0/drivers/char/vt_ioctl.c +5 -5
@@ -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 unimapdecase 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, strreturn -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 ))
Quoted 1 line · Andrey Borzenkov
Why are those ioctls forcibly applied to foreground console only?
Funny that you ask precisely now.
Current source has this patch already.
It very slightly changes the documented interface of these ioctls. I made kbd-1.09 yesterday evening. Expect to put it the usual places later tonight.
Andries