Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22bfda66 authored by Christian Borntraeger's avatar Christian Borntraeger Committed by Martin Schwidefsky
Browse files

s390/sclp: properly detect line mode console



To detect a line mode console we need a message event type
for the receive mask and a command event type for the send mask.
Checking for a MSG event in the sclp send mask was wrong and
might result in line mode consoles not being detected.

Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 74234355
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -145,9 +145,11 @@ bool __init sclp_has_linemode(void)

	if (sccb->header.response_code != 0x20)
		return 0;
	if (sccb->sclp_send_mask & (EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK))
		return 1;
	if (!(sccb->sclp_send_mask & (EVTYP_OPCMD_MASK | EVTYP_PMSGCMD_MASK)))
		return 0;
	if (!(sccb->sclp_receive_mask & (EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK)))
		return 0;
	return 1;
}

bool __init sclp_has_vt220(void)