tty: non-overlapping code for FKEY_CONTROL
. to decode it in kernel/debug.c Change-Id: I0d2cc66e87d97a362fa549b364b4d1b0e1225e66
This commit is contained in:
parent
dfbe2f16ee
commit
85fd078707
5 changed files with 19 additions and 21 deletions
|
@ -398,7 +398,7 @@ static void or_dump (message *m)
|
||||||
if(orp->or_mode != OR_M_ENABLED)
|
if(orp->or_mode != OR_M_ENABLED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m->m_type = FKEY_CONTROL;
|
m->m_type = TTY_FKEY_CONTROL;
|
||||||
m->FKEY_REQUEST = FKEY_EVENTS;
|
m->FKEY_REQUEST = FKEY_EVENTS;
|
||||||
if(OK!=(sendrec(TTY_PROC_NR,m)) )
|
if(OK!=(sendrec(TTY_PROC_NR,m)) )
|
||||||
printf("Contacting the TTY failed\n");
|
printf("Contacting the TTY failed\n");
|
||||||
|
|
|
@ -220,7 +220,8 @@ int main(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (tty_mess.m_type) {
|
switch (tty_mess.m_type) {
|
||||||
case FKEY_CONTROL: /* (un)register a fkey observer */
|
case TTY_FKEY_CONTROL: /* (un)register a fkey observer */
|
||||||
|
case OLD_FKEY_CONTROL: /* old number */
|
||||||
do_fkey_ctl(&tty_mess);
|
do_fkey_ctl(&tty_mess);
|
||||||
continue;
|
continue;
|
||||||
case INPUT_EVENT:
|
case INPUT_EVENT:
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
* 0x1000 - 0x10FF Notify messages
|
* 0x1000 - 0x10FF Notify messages
|
||||||
* 0x1100 - 0x11FF USB
|
* 0x1100 - 0x11FF USB
|
||||||
* 0x1200 - 0x12FF Devman
|
* 0x1200 - 0x12FF Devman
|
||||||
* 0x1300 - 0x13FF TTY Input
|
* 0x1300 - 0x13FF TTY Requests
|
||||||
* 0x1400 - 0x14FF VFS-FS transaction IDs
|
* 0x1400 - 0x14FF VFS-FS transaction IDs
|
||||||
* 0x1500 - 0x15FF Block device requests and responses
|
* 0x1500 - 0x15FF Block device requests and responses
|
||||||
* 0x1600 - 0x16FF VirtualBox (VBOX) requests (see vboxif.h)
|
* 0x1600 - 0x16FF VirtualBox (VBOX) requests (see vboxif.h)
|
||||||
|
@ -740,19 +740,6 @@
|
||||||
# define DS_NR_SNAPSHOT m2_i3 /* number of snapshot */
|
# define DS_NR_SNAPSHOT m2_i3 /* number of snapshot */
|
||||||
# define DS_OWNER m2_i3 /* owner */
|
# define DS_OWNER m2_i3 /* owner */
|
||||||
|
|
||||||
/*===========================================================================*
|
|
||||||
* Miscellaneous messages used by TTY *
|
|
||||||
*===========================================================================*/
|
|
||||||
|
|
||||||
/* Miscellaneous request types and field names, e.g. used by IS server. */
|
|
||||||
#define FKEY_CONTROL 98 /* control a function key at the TTY */
|
|
||||||
# define FKEY_REQUEST m2_i1 /* request to perform at TTY */
|
|
||||||
# define FKEY_MAP 10 /* observe function key */
|
|
||||||
# define FKEY_UNMAP 11 /* stop observing function key */
|
|
||||||
# define FKEY_EVENTS 12 /* request open key presses */
|
|
||||||
# define FKEY_FKEYS m2_l1 /* F1-F12 keys pressed */
|
|
||||||
# define FKEY_SFKEYS m2_l2 /* Shift-F1-F12 keys pressed */
|
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* Messages used between PM and VFS *
|
* Messages used between PM and VFS *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
|
@ -1233,17 +1220,27 @@
|
||||||
# define DEVMAN_RESULT m4_l1
|
# define DEVMAN_RESULT m4_l1
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* TTY INPUT INJECTION *
|
* TTY REQUESTS *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
|
|
||||||
#define INPUT_BASE 0x1300
|
#define TTY_RQ_BASE 0x1300
|
||||||
|
|
||||||
#define INPUT_EVENT (INPUT_BASE + 0)
|
#define INPUT_EVENT (TTY_RQ_BASE + 0)
|
||||||
|
|
||||||
# define INPUT_TYPE m4_l1
|
# define INPUT_TYPE m4_l1
|
||||||
# define INPUT_CODE m4_l2
|
# define INPUT_CODE m4_l2
|
||||||
# define INPUT_VALUE m4_l3
|
# define INPUT_VALUE m4_l3
|
||||||
|
|
||||||
|
|
||||||
|
#define TTY_FKEY_CONTROL (TTY_RQ_BASE + 1) /* control an F-key at TTY */
|
||||||
|
#define OLD_FKEY_CONTROL 98 /* previously used for TTY_FKEY_CONTROL */
|
||||||
|
# define FKEY_REQUEST m2_i1 /* request to perform at TTY */
|
||||||
|
# define FKEY_MAP 10 /* observe function key */
|
||||||
|
# define FKEY_UNMAP 11 /* stop observing function key */
|
||||||
|
# define FKEY_EVENTS 12 /* request open key presses */
|
||||||
|
# define FKEY_FKEYS m2_l1 /* F1-F12 keys pressed */
|
||||||
|
# define FKEY_SFKEYS m2_l2 /* Shift-F1-F12 keys pressed */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
|
|
|
@ -18,7 +18,7 @@ int *sfkeys; /* bit masks for Shift F1-F12 keys */
|
||||||
m.FKEY_REQUEST = request;
|
m.FKEY_REQUEST = request;
|
||||||
m.FKEY_FKEYS = (fkeys) ? *fkeys : 0;
|
m.FKEY_FKEYS = (fkeys) ? *fkeys : 0;
|
||||||
m.FKEY_SFKEYS = (sfkeys) ? *sfkeys : 0;
|
m.FKEY_SFKEYS = (sfkeys) ? *sfkeys : 0;
|
||||||
s = _taskcall(TTY_PROC_NR, FKEY_CONTROL, &m);
|
s = _taskcall(TTY_PROC_NR, TTY_FKEY_CONTROL, &m);
|
||||||
if (fkeys) *fkeys = m.FKEY_FKEYS;
|
if (fkeys) *fkeys = m.FKEY_FKEYS;
|
||||||
if (sfkeys) *sfkeys = m.FKEY_SFKEYS;
|
if (sfkeys) *sfkeys = m.FKEY_SFKEYS;
|
||||||
return(s);
|
return(s);
|
||||||
|
|
|
@ -77,7 +77,7 @@ message *m; /* notification message */
|
||||||
/* The notification message does not convey any information, other
|
/* The notification message does not convey any information, other
|
||||||
* than that some function keys have been pressed. Ask TTY for details.
|
* than that some function keys have been pressed. Ask TTY for details.
|
||||||
*/
|
*/
|
||||||
m->m_type = FKEY_CONTROL;
|
m->m_type = TTY_FKEY_CONTROL;
|
||||||
m->FKEY_REQUEST = FKEY_EVENTS;
|
m->FKEY_REQUEST = FKEY_EVENTS;
|
||||||
if (OK != (s=sendrec(TTY_PROC_NR, m)))
|
if (OK != (s=sendrec(TTY_PROC_NR, m)))
|
||||||
printf("IS: warning, sendrec to TTY failed: %d\n", s);
|
printf("IS: warning, sendrec to TTY failed: %d\n", s);
|
||||||
|
|
Loading…
Reference in a new issue