diff -u -r linux-2.6.29-rc8/drivers/char/vt_ioctl.c patched-linux-2.6.29-rc8/drivers/char/vt_ioctl.c --- linux-2.6.29-rc8/drivers/char/vt_ioctl.c 2009-03-12 22:39:28.000000000 -0400 +++ patched-linux-2.6.29-rc8/drivers/char/vt_ioctl.c 2009-03-24 15:50:33.000000000 -0400 @@ -846,6 +846,13 @@ ret = vt_waitactive(arg - 1); break; + + case VT_WAITSWITCH: + if (!perm) + goto eperm; + ret = vt_waitactive(-1234); + break; + /* * If a vt is under process control, the kernel will not switch to it * immediately, but postpone the operation until the process calls this @@ -1202,6 +1209,11 @@ if (signal_pending(current)) break; schedule(); + + if (vt == -1234) { + retval = 0; + break; + } } remove_wait_queue(&vt_activate_queue, &wait); __set_current_state(TASK_RUNNING); diff -u -r linux-2.6.29-rc8/include/linux/time.h patched-linux-2.6.29-rc8/include/linux/time.h --- linux-2.6.29-rc8/include/linux/time.h 2009-03-12 22:39:28.000000000 -0400 +++ patched-linux-2.6.29-rc8/include/linux/time.h 2009-03-23 16:57:37.000000000 -0400 @@ -115,6 +115,9 @@ extern void do_gettimeofday(struct timeval *tv); extern int do_settimeofday(struct timespec *tv); +extern unsigned long do_callfunc_gettimeoffset(void); + + extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz); #define do_posix_clock_monotonic_gettime(ts) ktime_get_ts(ts) extern long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags); diff -u -r linux-2.6.29-rc8/include/linux/vt.h patched-linux-2.6.29-rc8/include/linux/vt.h --- linux-2.6.29-rc8/include/linux/vt.h 2009-03-12 22:39:28.000000000 -0400 +++ patched-linux-2.6.29-rc8/include/linux/vt.h 2009-03-24 11:16:31.000000000 -0400 @@ -73,5 +73,6 @@ #define VT_LOCKSWITCH 0x560B /* disallow vt switching */ #define VT_UNLOCKSWITCH 0x560C /* allow vt switching */ #define VT_GETHIFONTMASK 0x560D /* return hi font mask */ +#define VT_WAITSWITCH 0x560E /* wait for change in active vt */ #endif /* _LINUX_VT_H */