syscons.c (3b34b2da350562f149ef2850593d9a140f28cab0) syscons.c (6be523bca7a9ffdeef7141602017ab1b2f833a52)
1/*-
2 * Copyright (c) 1992-1998 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 1003 unchanged lines hidden (view full) ---

1012
1013 case KDENABIO: /* allow io operations */
1014 error = suser(p);
1015 if (error != 0)
1016 return error;
1017 if (securelevel > 0)
1018 return EPERM;
1019#ifdef __i386__
1/*-
2 * Copyright (c) 1992-1998 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 1003 unchanged lines hidden (view full) ---

1012
1013 case KDENABIO: /* allow io operations */
1014 error = suser(p);
1015 if (error != 0)
1016 return error;
1017 if (securelevel > 0)
1018 return EPERM;
1019#ifdef __i386__
1020 p->p_md.md_regs->tf_eflags |= PSL_IOPL;
1020 p->p_frame->tf_eflags |= PSL_IOPL;
1021#endif
1022 return 0;
1023
1024 case KDDISABIO: /* disallow io operations (default) */
1025#ifdef __i386__
1021#endif
1022 return 0;
1023
1024 case KDDISABIO: /* disallow io operations (default) */
1025#ifdef __i386__
1026 p->p_md.md_regs->tf_eflags &= ~PSL_IOPL;
1026 p->p_frame->tf_eflags &= ~PSL_IOPL;
1027#endif
1028 return 0;
1029
1030 case KDSKBSTATE: /* set keyboard state (locks) */
1031 if (*(int *)data & ~LOCK_MASK)
1032 return EINVAL;
1033 scp->status &= ~LOCK_MASK;
1034 scp->status |= *(int *)data;

--- 2419 unchanged lines hidden ---
1027#endif
1028 return 0;
1029
1030 case KDSKBSTATE: /* set keyboard state (locks) */
1031 if (*(int *)data & ~LOCK_MASK)
1032 return EINVAL;
1033 scp->status &= ~LOCK_MASK;
1034 scp->status |= *(int *)data;

--- 2419 unchanged lines hidden ---