archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <>
To:, kernel list <>
Subject: Fix alt- -> console switching
Date: Tue, 4 Nov 2003 17:30:31 +0100	[thread overview]
Message-ID: <> (raw)


Take vesafb, do cat /etc/termcap, while it is printing press alt and
right arrow twice. Oops, it only goes one console to the right.

Problem is that if console is already being switched and you press
alt- ->, fg_console is still old one and second alt- -> is basically
lost. Here's a fix.

--- tmp/linux/drivers/char/keyboard.c	2003-11-04 17:13:00.000000000 +0100
+++ linux/drivers/char/keyboard.c	2003-11-04 17:08:57.000000000 +0100
@@ -528,8 +528,12 @@
 static void fn_inc_console(struct vc_data *vc, struct pt_regs *regs)
 	int i;
+	int cur = fg_console;
-	for (i = fg_console+1; i != fg_console; i++) {
+	if (want_console != -1)
+		cur = want_console;
+	for (i = cur+1; i != cur; i++) {
 		if (i == MAX_NR_CONSOLES)
 			i = 0;
 		if (vc_cons_allocated(i))

When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

                 reply	other threads:[~2003-11-04 16:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).