ctrlchar.h 644 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Unified handling of special chars.
  4. *
  5. * Copyright IBM Corp. 2001
  6. * Author(s): Fritz Elfert <felfert@millenux.com> <elfert@de.ibm.com>
  7. *
  8. */
  9. #include <linux/tty.h>
  10. #include <linux/sysrq.h>
  11. #include <linux/workqueue.h>
  12. extern unsigned int
  13. ctrlchar_handle(const unsigned char *buf, int len, struct tty_struct *tty);
  14. #define CTRLCHAR_NONE (1 << 8)
  15. #define CTRLCHAR_CTRL (2 << 8)
  16. #define CTRLCHAR_SYSRQ (3 << 8)
  17. #define CTRLCHAR_MASK (~0xffu)
  18. #ifdef CONFIG_MAGIC_SYSRQ
  19. struct sysrq_work {
  20. int key;
  21. struct work_struct work;
  22. };
  23. void schedule_sysrq_work(struct sysrq_work *sw);
  24. #endif