blob: e52afa3b8180972a8bd447fcfda1237d5756a947 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 * Unified handling of special chars.
4 *
Heiko Carstensa53c8fa2012-07-20 11:15:04 +02005 * Copyright IBM Corp. 2001
Linus Torvalds1da177e2005-04-16 15:20:36 -07006 * Author(s): Fritz Elfert <felfert@millenux.com> <elfert@de.ibm.com>
7 *
8 */
9
10#include <linux/tty.h>
Hendrik Bruecknerab7373b2015-08-18 17:42:39 +020011#include <linux/sysrq.h>
12#include <linux/workqueue.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013
14extern unsigned int
15ctrlchar_handle(const unsigned char *buf, int len, struct tty_struct *tty);
16
17
18#define CTRLCHAR_NONE (1 << 8)
19#define CTRLCHAR_CTRL (2 << 8)
20#define CTRLCHAR_SYSRQ (3 << 8)
21
22#define CTRLCHAR_MASK (~0xffu)
Hendrik Bruecknerab7373b2015-08-18 17:42:39 +020023
24
25#ifdef CONFIG_MAGIC_SYSRQ
26struct sysrq_work {
27 int key;
28 struct work_struct work;
29};
30
31void schedule_sysrq_work(struct sysrq_work *sw);
32#endif