Proper fix of VT_LOCKSWITCH ioctl.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Aleksandr Rybalko 2014-05-22 09:31:18 +00:00
parent b8a7acdf7b
commit c23c960364

View File

@ -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);