1. 14 12月, 2008 1 次提交
    • I
      console ASCII glyph 1:1 mapping · 1c55f187
      Ingo Brueckl 提交于
      For the console, there is a 1:1 mapping of glyphs which cannot be found
      in the current font.  This seems to be meant as a kind of 'emergency
      fallback' for fonts without unicode mapping which otherwise would
      display nothing readable on the screen.
      
      At the moment it affects all chars for which no substitution character
      is defined.  In particular this means that for all chars (>= 128) where
      there is no iso88591-1/unicode character (e.g.  control character area)
      you'll get the very strange 1:1 mapping of the (cp437) graphics card
      glyphs.
      
      I'm pretty sure that the 1:1 mapping should only affect strict ASCII
      code characters, i.e.  chars < 128.
      
      The patch limits the mapping as it probably was meant anyway.
      Signed-off-by: NIngo Brueckl <ib@wupperonline.de>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Egmont Koblinger <egmont@uhulinux.hu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1c55f187
  2. 07 11月, 2008 1 次提交
  3. 17 10月, 2008 1 次提交
  4. 15 10月, 2008 1 次提交
  5. 14 10月, 2008 4 次提交
  6. 16 8月, 2008 1 次提交
  7. 05 8月, 2008 1 次提交
    • A
      vt: Deadlock workaround · d5cae364
      Alan Cox 提交于
      2.6.26 corrected the mutex locking on tty resizing to fix the case where
      you could get the tty/vt sizing out of sync. That turns out to have a
      deadlock.
      
      The actual fix is really major and I've got it lined up as part of the ops
      changes for 2.6.28 so for 2.6.26/2.6.27 it is safer to reintroduce this
      ages old minor bug.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d5cae364
  8. 25 7月, 2008 2 次提交
  9. 22 7月, 2008 1 次提交
  10. 07 6月, 2008 2 次提交
  11. 04 6月, 2008 1 次提交
  12. 09 5月, 2008 1 次提交
  13. 30 4月, 2008 4 次提交
  14. 29 4月, 2008 1 次提交
    • J
      vt: fix background color on line feed · c9e587ab
      Jan Engelhardt 提交于
      A command that causes a line feed while a background color is active,
      such as
      
      	perl -e 'print "x" x 60, "\e[44m", "x" x 40, "\e[0m\n"'
      and
      	perl -e 'print "x" x 40, "\e[44m\n", "x" x 40, "\e[0m\n"'
      
      causes the line that was started as a result of the line feed to be completely
      filled with the currently active background color instead of the default
      color.
      
      When scrolling, part of the current screen is memcpy'd/memmove'd to the new
      region, and the new line(s) that will appear as a result are cleared using
      memset.  However, the lines are cleared with vc->vc_video_erase_char, causing
      them to be colored with the currently active background color.  This is
      different from X11 terminal emulators which always paint the new lines with
      the default background color (e.g.  `xterm -bg black`).
      
      The clear operation (\e[1J and \e[2J) also use vc_video_erase_char, so a new
      vc->vc_scrl_erase_char is introduced with contains the erase character used
      for scrolling, which is built from vc->vc_def_color instead of vc->vc_color.
      Signed-off-by: NJan Engelhardt <jengelh@computergmbh.de>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c9e587ab
  15. 28 4月, 2008 1 次提交
  16. 05 3月, 2008 1 次提交
  17. 07 2月, 2008 1 次提交
  18. 20 10月, 2007 1 次提交
  19. 19 10月, 2007 1 次提交
  20. 17 10月, 2007 2 次提交
    • B
      add CONFIG_VT_UNICODE · 2e8ecb9d
      Bill Nottingham 提交于
      As of now, the kernel defaults to non-unicode and XLATE for the keyboard.
      We've been changing this in Fedora, but that requires patching the defaults
      in the kernel.
      
      The attached introduces CONFIG_VT_UNICODE, which sets the console in
      unicode mode by default on boot, including both the virtual terminal and
      the keyboard driver.
      Signed-off-by: NBill Nottingham <notting@redhat.com>
      Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
      Cc: Dmitry Torokhov <dtor@mail.ru>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2e8ecb9d
    • A
      vt/vgacon: Check if screen resize request comes from userspace · e400b6ec
      Antonino A. Daplas 提交于
      Various console drivers are able to resize the screen via the con_resize()
      hook.  This hook is also visible in userspace via the TIOCWINSZ, VT_RESIZE and
      VT_RESIZEX ioctl's.  One particular utility, SVGATextMode, expects that
      con_resize() of the VGA console will always return success even if the
      resulting screen is not compatible with the hardware.  However, this
      particular behavior of the VGA console, as reported in Kernel Bugzilla Bug
      7513, can cause undefined behavior if the user starts with a console size
      larger than 80x25.
      
      To work around this problem, add an extra parameter to con_resize().  This
      parameter is ignored by drivers except for vgacon.  If this parameter is
      non-zero, then the resize request came from a VT_RESIZE or VT_RESIZEX ioctl
      and vgacon will always return success.  If this parameter is zero, vgacon will
      return -EINVAL if the requested size is not compatible with the hardware.  The
      latter is the more correct behavior.
      
      With this change, SVGATextMode should still work correctly while in-kernel and
      stty resize calls can expect correct behavior from vgacon.
      Signed-off-by: NAntonino Daplas <adaplas@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e400b6ec
  21. 18 7月, 2007 5 次提交
  22. 24 6月, 2007 1 次提交
    • E
      console UTF-8 fixes (fix) · 1ed8a2b3
      Egmont Koblinger 提交于
      Recently my console UTF-8 patch went mainline.  Here is an additional patch
      that fixes two nasty issues and improves a third one, namely:
      
      1. My patch changed the behavior if a glyph is not found in the Unicode
         mapping table. Previously for Unicode values less than 256 or 512 the
         kernel tried to display the glyph from that position of the glyph table,
         which could lead to a different accented letter being displayed. I
         removed this fallback possibility and changed it to display the
         replacement symbol.
      
         As Behdad pointed out, some fonts (e.g. sun12x22 from the kbd package)
         lack Unicode mapping information, hence all you get is lots of question
         marks. Though theoretically it's actually a user-space bug (the font
         should be fixed), Behdad and I both believe that it'd be good to work
         around in the kernel by re-introducing the fallback solution for ASCII
         characters only. This sounds a quite reasonable decision, since all fonts
         ship the ASCII characters in the first 128 positions. This way users
         won't be surprised by lots of question marks just because s/he issued a
         not-so-perfectly parameterized setfont command. As this fallback is only
         re-introduced for code points below 128, you still won't see an accented
         letter replaced by another, but at least you'll always get the English
         letters right.
      
      2. My patch introduced "question mark with inverted color attributes" as a
         last resort fallback glyph. Though it perfectly works on VGA console, on
         framebuffer you may end up with question marks that are highlighed but
         shouldn't be, and normal characters that are accidentally highlighed.
         This is caused by missing FLUSHes when changing the color attribute.
      
      3. I've updated the table of double-width character based on Markus's
         updated version. Only ten new code poings (one interval) is added.
      Signed-off-by: NEgmont Koblinger <egmont@uhulinux.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1ed8a2b3
  23. 09 5月, 2007 5 次提交
    • M
      use mutex instead of semaphore in virtual console driver · c831c338
      Matthias Kaehlcke 提交于
      The virtual console driver uses a semaphore as mutex.  Use the mutex API
      instead of the (binary) semaphore.
      Signed-off-by: NMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c831c338
    • A
      vt: expose system-wide UTF-8 default setting via sysfs · 042f10ec
      Antonino A. Daplas 提交于
      Create a variable, default_utf8, that defines the system-wide default UTF-8
      setting.  This variable can be altered via sysfs. If the variable is properly
      set, this should mimimize breakage of UTF-8 encoded consoles when doing a
      reset or echo -e '\033c' and of newly opened/allocated consoles.
      
      This is based from patches by Jan Engelhardt and Paul LeoNerd Evans.
      Signed-off-by: NAntonino Daplas <adaplas@gmail.com>
      Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
      Cc: Paul LeoNerd Evans <leonerd@leonerd.org.uk>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      042f10ec
    • J
      vt: add color support to the "underline" and "italic" attributes · fa6ce9ab
      Jan Engelhardt 提交于
      Add color support to the "underline" and "italic" attributes as in
      OpenBSD/NetBSD-style (vt220) and xterm.
      Signed-off-by: NJan Engelhardt <jengelh@gmx.de>
      Acked-by: N"Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fa6ce9ab
    • J
      vt: allow for the palette to be exposed and changed via sysfs · 1c2bbe6a
      Jan Engelhardt 提交于
      Allow for the palette to be exposed and changed via sysfs.  A call to
      /usr/bin/reset will slurp the new definitions in for the current console.
      
      Already posted at http://lkml.org/lkml/2006/1/15/149Signed-off-by: NJan Engelhardt <jengelh@gmx.de>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1c2bbe6a
    • E
      console UTF-8 fixes · 2f1a2ccb
      Egmont Koblinger 提交于
      The UTF-8 part of the vt driver suffers from the following issues which are
      addressed in my patch:
      
      1) If there's no glyph found for a particular valid UTF-8 character, we try
         to display U+FFFD. However if this one is not found either, here's what
         the current kernel does:
      
         - First, if the Unicode value is less than the number of glyphs, use the
           glyph directly from that position of the glyph table. While it may be a
           good idea in the 8-bit world, it has absolutely no sense with Unicode
           in mind. For example, if a Latin-2 font is loaded and an application
           prints U+00FB ("u with circumflex", not present in Latin-2) then as a
           fallback solution the glyph from the 0xFB position of the Latin-2
           fontset (which is an "u with double accent" - a different character) is
           displayed.
      
         - Second, if this fallback fails too, a simple ASCII question mark is
           printed, which is visually undistinguishable from a real question mark.
      
         I changed the code to skip the first step (except if in non-UTF-8 mode),
         and changed the second step to print the question mark with inverse color
         attributes, so it is visually clear that it's not a real question mark,
         and resembles more to the common glyph of U+FFFD.
      
      2) The UTF-8 decoder is buggy in many ways:
      
         - Lone continuation bytes (section 3.1 of Markus Kuhn's UTF-8 stress
           test) are not caught, they are displayed as some "random" (taken
           directly form the font table, see above) glyphs instead the replacement
           character.
      
         - Incomplete sequences (sections 3.2 and 3.3 of the stress test) emit no
           replacement character, but rather cause the subsequent valid character
           to be displayed more times(!).
      
         - The decoder is not safe: overlong sequences are not caught currently,
           they are displayed as if these were valid representations. This may
           even have security impacts.
      
         - The decoder does not handle D800..DFFF and FFFE..FFFF specially, it
           just emits these code points and lets it be looked up in the glyph
           table. Since these are invalid code points, I replace them by U+FFFD
           and hence give no chance for them to be looked up in the glyph table.
           (Assuming no font ships glyphs for these code points, this change is
           not visible to the users since the glyph shown will be the same.)
      
         With my fixes to the decoder it now behaves exactly as Markus Kuhn's
         stress test recommends.
      
      3) It has no concept of double-width (CJK) characters. It's way beyond the
         scope of my patch to try to display them, but at least I think it's
         important for the cursor to jump two positions when printing such
         characters, since this is what applications (such as text editors)
         expect. Currently the cursor only jumps one position, and hence
         applications suffer from displaying and refreshing problems, and editing
         some English letters that are preceded by some CJK characters in the same
         line is a nightmare. With my patch an additional space is inserted after
         the CJK character has been printed (which usually means a replacement
         symbol of course). (If U+FFFD isn't availble and hence an inverse
         question mark is displayed in the first cell, I keep the inverted state
         for the space in the 2nd column so it's quite easy to see that they are
         tied together.)
      
      4) There is a small built-in table of zero-width spaces that are not to be
         printed but silently skipped. U+200A is included there, but it's not a
         zero-width character, so I remove it from there.
      Signed-off-by: NEgmont Koblinger <egmont@uhulinux.hu>
      Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2f1a2ccb