summaryrefslogtreecommitdiffstats
path: root/scripts/kvm
diff options
context:
space:
mode:
authorJanosch Frank <frankja@linux.vnet.ibm.com>2016-01-11 16:18:00 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:29:55 -0600
commit7a75238535f85069fca73ee3403aff0580ab917d (patch)
tree102fbb7a2ba0b439b494c464ee4307307ebb71d1 /scripts/kvm
parent39da6305ff4ea120341d731aac7dcb73d48075cf (diff)
downloadhqemu-7a75238535f85069fca73ee3403aff0580ab917d.zip
hqemu-7a75238535f85069fca73ee3403aff0580ab917d.tar.gz
scripts/kvm/kvm_stat: Read event values as u64
The struct read_format, which denotes the returned values on a read states that the values are u64 and not long long which is used for struct unpacking. Therefore the 'q' long long formatter was exchanged with 'Q' which is the format for u64 data. Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-31-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/kvm')
-rwxr-xr-xscripts/kvm/kvm_stat2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat
index ce97046..611f82a 100755
--- a/scripts/kvm/kvm_stat
+++ b/scripts/kvm/kvm_stat
@@ -358,7 +358,7 @@ class Group(object):
def read(self):
length = 8 * (1 + len(self.events))
- read_format = 'xxxxxxxx' + 'q' * len(self.events)
+ read_format = 'xxxxxxxx' + 'Q' * len(self.events)
return dict(zip([event.name for event in self.events],
struct.unpack(read_format,
os.read(self.events[0].fd, length))))
OpenPOWER on IntegriCloud