public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	thuth@redhat.com, david@redhat.com, nsg@linux.ibm.com,
	nrb@linux.ibm.com
Subject: Re: [kvm-unit-tests RFC 2/3] lib: s390x: sclp: Clear ASCII screen on setup
Date: Fri, 30 Jun 2023 17:25:58 +0200	[thread overview]
Message-ID: <20230630172558.3edfa9ec@p-imbrenda> (raw)
In-Reply-To: <20230630145449.2312-3-frankja@linux.ibm.com>

On Fri, 30 Jun 2023 14:54:48 +0000
Janosch Frank <frankja@linux.ibm.com> wrote:

> In contrast to the line-mode console the ASCII console will retain

what's the problem with that?

> previously written text on a reboot. So let's clear the console on
> setup so only our text will be displayed. To not clear the whole
> screen when running under QEMU we switch the run command to the line
> mode console.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
>  lib/s390x/sclp-console.c | 2 ++
>  s390x/run                | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/s390x/sclp-console.c b/lib/s390x/sclp-console.c
> index 384080b0..534d3443 100644
> --- a/lib/s390x/sclp-console.c
> +++ b/lib/s390x/sclp-console.c
> @@ -233,6 +233,8 @@ void sclp_console_setup(void)
>  {
>  	/* We send ASCII and line mode. */
>  	sclp_write_event_mask(0, SCLP_EVENT_MASK_MSG_ASCII | SCLP_EVENT_MASK_MSG);
> +	/* Hard terminal reset to clear screen */
> +	sclp_print_ascii("\ec");
>  }
>  
>  void sclp_print(const char *str)
> diff --git a/s390x/run b/s390x/run
> index f1111dbd..68f8e733 100755
> --- a/s390x/run
> +++ b/s390x/run
> @@ -28,7 +28,7 @@ fi
>  M='-machine s390-ccw-virtio'
>  M+=",accel=$ACCEL"
>  command="$qemu -nodefaults -nographic $M"
> -command+=" -chardev stdio,id=con0 -device sclpconsole,chardev=con0"
> +command+=" -chardev stdio,id=con0 -device sclplmconsole,chardev=con0"
>  command+=" -kernel"
>  command="$(panic_cmd) $(migration_cmd) $(timeout_cmd) $command"
>  


  reply	other threads:[~2023-06-30 15:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30 14:54 [kvm-unit-tests RFC 0/3] s390x: Improve console handling Janosch Frank
2023-06-30 14:54 ` [kvm-unit-tests RFC 1/3] lib: s390x: sclp: Add carriage return to line feed Janosch Frank
2023-06-30 15:12   ` Claudio Imbrenda
2023-07-03 11:46     ` Janosch Frank
2023-07-03 12:04       ` Claudio Imbrenda
2023-06-30 14:54 ` [kvm-unit-tests RFC 2/3] lib: s390x: sclp: Clear ASCII screen on setup Janosch Frank
2023-06-30 15:25   ` Claudio Imbrenda [this message]
2023-07-03 11:36     ` Janosch Frank
2023-07-03 11:57       ` Claudio Imbrenda
2023-07-03 12:30         ` Janosch Frank
2023-06-30 14:54 ` [kvm-unit-tests RFC 3/3] lib: s390x: sclp: Add line mode input handling Janosch Frank

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230630172558.3edfa9ec@p-imbrenda \
    --to=imbrenda@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=nsg@linux.ibm.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox