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

s390/fs3270: fix screen reset on activate

fs3270 uses EWRITEA to clear the screen when a user opens /dev/3270/tub.
However it misses the attribute byte after the EWRITEA, so (at least)
x3270 complains about 'Record too short, missing write flags'.
Add the missing flag byte to fix this.
Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent ec40213b
......@@ -122,16 +122,19 @@ static int fs3270_activate(struct raw3270_view *view)
if (!raw3270_request_final(fp->init))
return 0;
raw3270_request_set_cmd(fp->init, TC_EWRITEA);
raw3270_request_set_idal(fp->init, fp->rdbuf);
fp->init->rescnt = 0;
cp = fp->rdbuf->data[0];
if (fp->rdbuf_size == 0) {
/* No saved buffer. Just clear the screen. */
raw3270_request_set_cmd(fp->init, TC_EWRITEA);
fp->init->ccw.count = 1;
fp->init->callback = fs3270_reset_callback;
cp[0] = 0;
} else {
/* Restore fullscreen buffer saved by fs3270_deactivate. */
raw3270_request_set_cmd(fp->init, TC_EWRITEA);
raw3270_request_set_idal(fp->init, fp->rdbuf);
fp->init->ccw.count = fp->rdbuf_size;
cp = fp->rdbuf->data[0];
fp->init->callback = fs3270_restore_callback;
cp[0] = TW_KR;
cp[1] = TO_SBA;
cp[2] = cp[6];
......@@ -140,8 +143,6 @@ static int fs3270_activate(struct raw3270_view *view)
cp[5] = TO_SBA;
cp[6] = 0x40;
cp[7] = 0x40;
fp->init->rescnt = 0;
fp->init->callback = fs3270_restore_callback;
}
rc = raw3270_start_locked(view, fp->init);
fp->init->rc = rc;
......
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