mirror of
https://github.com/xemu-project/xemu.git
synced 2025-04-02 11:11:48 -04:00
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>
This commit is contained in:
parent
00842aaca5
commit
d8e44802f8
1 changed files with 1 additions and 1 deletions
|
@ -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))))
|
||||
|
|
Loading…
Add table
Reference in a new issue