diff options
author | Stefan Raspl <raspl@linux.vnet.ibm.com> | 2017-03-10 13:40:00 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-03-29 12:01:24 +0200 |
commit | a0b4e6a0325e325d91901342dd436d917da0ddd6 (patch) | |
tree | 9eea53be06a6e92cc1b8bf79498f11f8578067b5 /tools/kvm | |
parent | 2beb6dad2e8f95d710159d5befb390e4f62ab5cf (diff) | |
download | linux-a0b4e6a0325e325d91901342dd436d917da0ddd6.tar.bz2 |
tools/kvm_stat: hide cursor
When running kvm_stat in interactive mode, the cursor appears at the lower
left corner, which looks a bit distracting.
This patch hides the cursor by turning it invisible.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Reviewed-By: Sascha Silbe <silbe@linux.vnet.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'tools/kvm')
-rwxr-xr-x | tools/kvm/kvm_stat/kvm_stat | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/kvm/kvm_stat/kvm_stat b/tools/kvm/kvm_stat/kvm_stat index 581278c58488..8cc83a309e65 100755 --- a/tools/kvm/kvm_stat/kvm_stat +++ b/tools/kvm/kvm_stat/kvm_stat @@ -812,6 +812,13 @@ class Tui(object): except: pass + # Hide cursor in extra statement as some monochrome terminals + # might support hiding but not colors. + try: + curses.curs_set(0) + except curses.error: + pass + curses.use_default_colors() return self |