]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/qemu-xen.git/commitdiff
scripts/kvm/kvm_stat: Read event values as u64
authorJanosch Frank <frankja@linux.vnet.ibm.com>
Mon, 11 Jan 2016 15:18:00 +0000 (16:18 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 26 Jan 2016 14:58:13 +0000 (15:58 +0100)
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>
scripts/kvm/kvm_stat

index ce970465d616f4c4337eb9286087bb52deae339d..611f82ad2aa7e5070e06e93b8dbd4a5725399c0c 100755 (executable)
@@ -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))))