svn commit: r266540 - head/sys/dev/vt

Aleksandr Rybalko ray at FreeBSD.org
Thu May 22 09:31:19 UTC 2014


Author: ray
Date: Thu May 22 09:31:18 2014
New Revision: 266540
URL: http://svnweb.freebsd.org/changeset/base/266540

Log:
  Proper fix of VT_LOCKSWITCH ioctl.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/dev/vt/vt_core.c

Modified: head/sys/dev/vt/vt_core.c
==============================================================================
--- head/sys/dev/vt/vt_core.c	Thu May 22 09:28:36 2014	(r266539)
+++ head/sys/dev/vt/vt_core.c	Thu May 22 09:31:18 2014	(r266540)
@@ -1815,9 +1815,9 @@ skip_thunk:
 	case VT_LOCKSWITCH:
 		/* TODO: Check current state, switching can be in progress. */
 		if ((*(int *)data) == 0x01)
-			vw->vw_flags &= ~VWF_VTYLOCK;
-		else if ((*(int *)data) == 0x02)
 			vw->vw_flags |= VWF_VTYLOCK;
+		else if ((*(int *)data) == 0x02)
+			vw->vw_flags &= ~VWF_VTYLOCK;
 		else
 			return (EINVAL);
 		return (0);


More information about the svn-src-head mailing list