1 /* all.c -- console grabbing plugin for vlock,
2 * the VT locking program for linux
4 * This program is copyright (C) 2007 Frank Benkstein, and is free
5 * software which is freely distributable under the terms of the
6 * GNU General Public License version 2, included as the file COPYING in this
7 * distribution. It is NOT public domain software, and any
8 * redistribution not permitted by the GNU General Public License is
9 * expressly forbidden without prior written permission from
19 #include <sys/ioctl.h>
23 #include "vlock_plugin.h"
24 #include "console_switch.h"
26 bool vlock_start(void __attribute__((unused
)) **ctx_ptr
)
30 if (!lock_console_switch(&error
)) {
32 fprintf(stderr
, "vlock-all: %s\n", error
);
35 fprintf(stderr
, "vlock-all: could not disable console switching\n");
39 return console_switch_locked
;
42 bool vlock_end(void __attribute__((unused
)) **ctx_ptr
)
44 unlock_console_switch();