summaryrefslogtreecommitdiffstats
path: root/tools/kvm/kvm_stat
diff options
context:
space:
mode:
authorStefan Raspl <raspl@linux.vnet.ibm.com>2017-03-10 13:40:12 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2017-03-29 12:01:30 +0200
commit645c1728a9d33d78028d93a2ed770f51df0a92c6 (patch)
tree8129611853d93b9452514b21ff34fb805ef3b9a5 /tools/kvm/kvm_stat
parent72187dfa8e2686b748ad7485d0ca59ba993ba526 (diff)
downloadlinux-645c1728a9d33d78028d93a2ed770f51df0a92c6.tar.bz2
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/kvm/kvm_stat')
-rwxr-xr-xtools/kvm/kvm_stat/kvm_stat1
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: