Commit e22de7d7 authored by Sven Schnelle's avatar Sven Schnelle Committed by Heiko Carstens

s390/tty3270: add AID defines

Use AID_* instead of hex numbers to make the code a bit
easier to read. also convert the if/else blocks to a
switch statement in tty3270_read_tasklet().
Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Tested-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 970cf9a9
......@@ -565,7 +565,8 @@ static void tty3270_read_tasklet(unsigned long data)
*/
input = NULL;
len = 0;
if (tp->input->string[0] == 0x7d) {
switch (tp->input->string[0]) {
case AID_ENTER:
/* Enter: write input to tty. */
input = tp->input->string + 6;
len = tp->input->len - 6 - rrq->rescnt;
......@@ -579,10 +580,13 @@ static void tty3270_read_tasklet(unsigned long data)
/* Clear input area. */
tty3270_update_prompt(tp, NULL, 0);
tty3270_set_timer(tp, 1);
} else if (tp->input->string[0] == 0x6d) {
break;
case AID_CLEAR:
/* Display has been cleared. Redraw. */
tp->update_flags = TTY_UPDATE_ALL;
tty3270_set_timer(tp, 1);
default:
break;
}
spin_unlock_irq(&tp->view.lock);
......
......@@ -82,6 +82,13 @@
#define RAW3270_FIRSTMINOR 1 /* First minor number */
#define RAW3270_MAXDEVS 255 /* Max number of 3270 devices */
#define AID_CLEAR 0x6d
#define AID_ENTER 0x7d
#define AID_PF3 0xf3
#define AID_PF7 0xf7
#define AID_PF8 0xf8
#define AID_READ_PARTITION 0x88
/* For TUBGETMOD and TUBSETMOD. Should include. */
struct raw3270_iocb {
short model;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment