Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
ctrlchar.h File Reference
#include <linux/tty.h>

Go to the source code of this file.

Macros

#define CTRLCHAR_NONE   (1 << 8)
 
#define CTRLCHAR_CTRL   (2 << 8)
 
#define CTRLCHAR_SYSRQ   (3 << 8)
 
#define CTRLCHAR_MASK   (~0xffu)
 

Functions

unsigned int ctrlchar_handle (const unsigned char *buf, int len, struct tty_struct *tty)
 

Macro Definition Documentation

#define CTRLCHAR_CTRL   (2 << 8)

Definition at line 16 of file ctrlchar.h.

#define CTRLCHAR_MASK   (~0xffu)

Definition at line 19 of file ctrlchar.h.

#define CTRLCHAR_NONE   (1 << 8)

Definition at line 15 of file ctrlchar.h.

#define CTRLCHAR_SYSRQ   (3 << 8)

Definition at line 17 of file ctrlchar.h.

Function Documentation

unsigned int ctrlchar_handle ( const unsigned char buf,
int  len,
struct tty_struct tty 
)

Check for special chars at start of input.

Parameters
bufConsole input buffer.
lenLength of valid data in buffer.
ttyThe tty struct for this console.
Returns
CTRLCHAR_NONE, if nothing matched, CTRLCHAR_SYSRQ, if sysrq was encountered otherwise char to be inserted logically or'ed with CTRLCHAR_CTRL

Definition at line 41 of file ctrlchar.c.