mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Scott McDermott <vaxerdec@frontiernet.net>
To: linux-kernel@vger.kernel.org
Subject: vt ioctl to get new vt requested by change_console?
Date: Sat, 30 Mar 2002 15:07:06 -0500	[thread overview]
Message-ID: <20020330150706.A4932@vaxerdec.homeip.net> (raw)

Would anyone consider this patch? I don't know how else to get this info
from a user program.  I want to use VT_RELDISP ioctl to say it's not ok
to do a VT switch, based on which VT was requested for activation.  This
information is not otherwise available.

diff -ur linux-2.4.19-pre4/drivers/char/vt.c linux-2.4.19-pre4.new/drivers/char/vt.c
--- linux-2.4.19-pre4/drivers/char/vt.c	Fri Nov 16 13:08:28 2001
+++ linux-2.4.19-pre4.new/drivers/char/vt.c	Fri Mar 29 20:24:47 2002
@@ -735,6 +735,10 @@
 		return copy_to_user((void*)arg, &(vt_cons[console]->vt_mode), 
 							sizeof(struct vt_mode)) ? -EFAULT : 0; 
 
+	case VT_GETNEWVT:
+		return copy_to_user((void*)arg, &(vt_cons[console]->vt_newvt), 
+							sizeof(int)) ? -EFAULT : 0; 
+
 	/*
 	 * Returns global vt state. Note that VT 0 is always open, since
 	 * it's an alias for the current VT, and people can't use it here.
diff -ur linux-2.4.19-pre4/include/linux/vt.h linux-2.4.19-pre4.new/include/linux/vt.h
--- linux-2.4.19-pre4/include/linux/vt.h	Sun Mar 24 05:09:37 1996
+++ linux-2.4.19-pre4.new/include/linux/vt.h	Fri Mar 29 20:25:19 2002
@@ -51,4 +51,6 @@
 #define VT_LOCKSWITCH   0x560B  /* disallow vt switching */
 #define VT_UNLOCKSWITCH 0x560C  /* allow vt switching */
 
+#define VT_GETNEWVT	0x560D	/* which vt has yet to complete VT_ACTIVATE */
+
 #endif /* _LINUX_VT_H */

                 reply	other threads:[~2002-03-30 20:08 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:
  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=20020330150706.A4932@vaxerdec.homeip.net \
    --to=vaxerdec@frontiernet.net \
    --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

all inboxes | Powered by JetHome®