From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a706s-0003JC-6O for qemu-devel@nongnu.org; Thu, 10 Dec 2015 07:14:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a706m-0003qB-Fq for qemu-devel@nongnu.org; Thu, 10 Dec 2015 07:14:10 -0500 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:55995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a706m-0003pk-65 for qemu-devel@nongnu.org; Thu, 10 Dec 2015 07:14:04 -0500 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 10 Dec 2015 12:14:03 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 85EE51B0806B for ; Thu, 10 Dec 2015 12:14:29 +0000 (GMT) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tBACDxRk57606198 for ; Thu, 10 Dec 2015 12:13:59 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tBACDx8Q025546 for ; Thu, 10 Dec 2015 05:13:59 -0700 From: Janosch Frank Date: Thu, 10 Dec 2015 13:13:01 +0100 Message-Id: <1449749584-23214-32-git-send-email-frankja@linux.vnet.ibm.com> In-Reply-To: <1449749584-23214-1-git-send-email-frankja@linux.vnet.ibm.com> References: <1449749584-23214-1-git-send-email-frankja@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 31/34] scripts/kvm/kvm_stat: Read event values as u64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: cornelia.huck@de.ibm.com, frankja@linux.vnet.ibm.com 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. --- scripts/kvm/kvm_stat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat index ab10b1a..ee4cf31 100755 --- a/scripts/kvm/kvm_stat +++ b/scripts/kvm/kvm_stat @@ -339,7 +339,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)))) -- 2.3.0