From: Stefan Raspl Date: Fri, 10 Mar 2017 12:40:00 +0000 (+0100) Subject: tools/kvm_stat: hide cursor X-Git-Tag: v5.15~11350^2~87 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a0b4e6a0325e325d91901342dd436d917da0ddd6;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-By: Sascha Silbe Reviewed-by: Marc Hartmayer Signed-off-by: Radim Krčmář --- diff --git a/tools/kvm/kvm_stat/kvm_stat b/tools/kvm/kvm_stat/kvm_stat index 581278c..8cc83a30 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