public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] vt: add TIOCL_GETKMSGREDIRECT
  2006-03-30 16:58 [PATCH] vt: add TIOCL_GETKMSGREDIRECT Rafael J. Wysocki
@ 2006-03-29  0:40 ` Pavel Machek
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2006-03-29  0:40 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Andrew Morton, LKML

On Thu 30-03-06 18:58:26, Rafael J. Wysocki wrote:
> Add TIOCL_GETKMSGREDIRECT needed by the userland suspend tool to get
> the current value of kmsg_redirect from the kernel so that it can save it and
> restore it after resume.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>

ACK, FWIW.
-- 
Thanks, Sharp!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] vt: add TIOCL_GETKMSGREDIRECT
@ 2006-03-30 16:58 Rafael J. Wysocki
  2006-03-29  0:40 ` Pavel Machek
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2006-03-30 16:58 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, Pavel Machek

Add TIOCL_GETKMSGREDIRECT needed by the userland suspend tool to get
the current value of kmsg_redirect from the kernel so that it can save it and
restore it after resume.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/char/vt.c     |    4 ++++
 include/linux/tiocl.h |    1 +
 2 files changed, 5 insertions(+)

Index: linux-2.6.16-mm1/drivers/char/vt.c
===================================================================
--- linux-2.6.16-mm1.orig/drivers/char/vt.c
+++ linux-2.6.16-mm1/drivers/char/vt.c
@@ -2328,6 +2328,10 @@ int tioclinux(struct tty_struct *tty, un
 		case TIOCL_SETVESABLANK:
 			set_vesa_blanking(p);
 			break;
+		case TIOCL_GETKMSGREDIRECT:
+			data = kmsg_redirect;
+			ret = __put_user(data, p);
+			break;
 		case TIOCL_SETKMSGREDIRECT:
 			if (!capable(CAP_SYS_ADMIN)) {
 				ret = -EPERM;
Index: linux-2.6.16-mm1/include/linux/tiocl.h
===================================================================
--- linux-2.6.16-mm1.orig/include/linux/tiocl.h
+++ linux-2.6.16-mm1/include/linux/tiocl.h
@@ -34,5 +34,6 @@ struct tiocl_selection {
 #define TIOCL_SCROLLCONSOLE	13	/* scroll console */
 #define TIOCL_BLANKSCREEN	14	/* keep screen blank even if a key is pressed */
 #define TIOCL_BLANKEDSCREEN	15	/* return which vt was blanked */
+#define TIOCL_GETKMSGREDIRECT	17	/* get the vt the kernel messages are restricted to */
 
 #endif /* _LINUX_TIOCL_H */



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-03-30 18:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-30 16:58 [PATCH] vt: add TIOCL_GETKMSGREDIRECT Rafael J. Wysocki
2006-03-29  0:40 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox