Blame SOURCES/kvm-tools-kvm_stat-remove-regex-filter-on-empty-input.patch

9bac43
From 3c7dae7507abb6ebe8c2dd9a4ef76e55135c8acd Mon Sep 17 00:00:00 2001
9bac43
From: David Hildenbrand <david@redhat.com>
9bac43
Date: Tue, 17 Oct 2017 19:15:39 +0200
9bac43
Subject: [PATCH 34/69] tools/kvm_stat: remove regex filter on empty input
9bac43
MIME-Version: 1.0
9bac43
Content-Type: text/plain; charset=UTF-8
9bac43
Content-Transfer-Encoding: 8bit
9bac43
9bac43
RH-Author: David Hildenbrand <david@redhat.com>
9bac43
Message-id: <20171017191605.2378-14-david@redhat.com>
9bac43
Patchwork-id: 77322
9bac43
O-Subject: [RHEL-7.5 qemu-kvm-rhev PATCH 13/39] tools/kvm_stat: remove regex filter on empty input
9bac43
Bugzilla: 1497137
9bac43
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9bac43
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
9bac43
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
9bac43
RH-Acked-by: Thomas Huth <thuth@redhat.com>
9bac43
9bac43
Upstream-status: linux.git 645c1728a9d33d78028d93a2ed770f51df0a92c6
9bac43
9bac43
commit 645c1728a9d33d78028d93a2ed770f51df0a92c6
9bac43
Author: Stefan Raspl <raspl@linux.vnet.ibm.com>
9bac43
Date:   Fri Mar 10 13:40:12 2017 +0100
9bac43
9bac43
    tools/kvm_stat: remove regex filter on empty input
9bac43
9bac43
    Behavior on empty/0 input for regex and pid filtering was inconsistent, as
9bac43
    the former would keep the current filter, while the latter would (naturally)
9bac43
    remove any pid filtering.
9bac43
    Make things consistent by falling back to the default filter on empty input
9bac43
    for the regex filter dialogue.
9bac43
9bac43
    Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
9bac43
    Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
9bac43
    Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
9bac43
9bac43
Signed-off-by: David Hildenbrand <david@redhat.com>
9bac43
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9bac43
---
9bac43
 scripts/kvm/kvm_stat | 1 +
9bac43
 1 file changed, 1 insertion(+)
9bac43
9bac43
diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
9bac43
index af70717..f2a868b 100755
9bac43
--- a/scripts/kvm/kvm_stat
9bac43
+++ b/scripts/kvm/kvm_stat
9bac43
@@ -966,6 +966,7 @@ class Tui(object):
9bac43
             regex = self.screen.getstr()
9bac43
             curses.noecho()
9bac43
             if len(regex) == 0:
9bac43
+                self.stats.fields_filter = r'^[^\(]*$'
9bac43
                 self.refresh_header()
9bac43
                 return
9bac43
             try:
9bac43
-- 
9bac43
1.8.3.1
9bac43