diff options
author | Stefan Raspl <raspl@linux.vnet.ibm.com> | 2017-03-10 13:40:12 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-03-29 12:01:30 +0200 |
commit | 645c1728a9d33d78028d93a2ed770f51df0a92c6 (patch) | |
tree | 8129611853d93b9452514b21ff34fb805ef3b9a5 /tools | |
parent | tools/kvm_stat: display regex when set to non-default (diff) | |
download | linux-645c1728a9d33d78028d93a2ed770f51df0a92c6.tar.xz linux-645c1728a9d33d78028d93a2ed770f51df0a92c6.zip |
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 <raspl@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')
-rwxr-xr-x | tools/kvm/kvm_stat/kvm_stat | 1 |
1 files changed, 1 insertions, 0 deletions
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: |