From: Stefan Raspl Date: Fri, 10 Mar 2017 12:40:12 +0000 (+0100) Subject: tools/kvm_stat: remove regex filter on empty input X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=645c1728a9d33d78028d93a2ed770f51df0a92c6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git tools/kvm_stat: remove regex filter on empty input Behavior on empty/0 input for regex and pid filtering was inconsistent, as the former would keep the current filter, while the latter would (naturally) remove any pid filtering. Make things consistent by falling back to the default filter on empty input for the regex filter dialogue. Signed-off-by: Stefan Raspl 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 af7071778a0c..f2a868b696a8 100755 --- a/tools/kvm/kvm_stat/kvm_stat +++ b/tools/kvm/kvm_stat/kvm_stat @@ -966,6 +966,7 @@ class Tui(object): regex = self.screen.getstr() curses.noecho() if len(regex) == 0: + self.stats.fields_filter = r'^[^\(]*$' self.refresh_header() return try: