scripts/kvm/kvm_stat: Fix tracefs access checking
commite3dd68df5287e544a41f77a162a02d08fbcb95ba
authorJanosch Frank <frankja@linux.vnet.ibm.com>
Wed, 3 Feb 2016 07:41:31 +0000 (3 08:41 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 9 Feb 2016 14:45:26 +0000 (9 15:45 +0100)
tree45ef1fa87bc13ea1e85dd5bf4fb3b12260ca87b2
parent50901218457aebf2eb1c1cac560eb80df3f23b77
scripts/kvm/kvm_stat: Fix tracefs access checking

On kernels build without CONFIG_TRACING kvm_stat will bail out even
when traces are not used. This is not very helpful, especially if the
user can't install a new kernel. Instead, we should warn the user and
fall back to debugfs statistics.

These changes check if trace statistics were selected without kernel
support, warn with a small timeout, set the debugfs statistics option
to True and the tracefs one to False.

Fixes: 7aa4ee5 ('scripts/kvm/kvm_stat: Improve debugfs access checking')
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Message-Id: <1454485291-43849-2-git-send-email-frankja@linux.vnet.ibm.com>
[Exit if -t is passed explicitly. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/kvm/kvm_stat