]> git.proxmox.com Git - mirror_qemu.git/commit
scripts/kvm/kvm_stat: Fixup syscall error reporting
authorJanosch Frank <frankja@linux.vnet.ibm.com>
Mon, 11 Jan 2016 15:17:43 +0000 (16:17 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 26 Jan 2016 14:58:12 +0000 (15:58 +0100)
commit400b3cb519a286421e61692058b980adb7554e1e
tree5dc7b94640f951e8aa9137ab59226f209b6c485c
parentf4109dba216f2df61a6098fdd7a6f2d2be4ac848
scripts/kvm/kvm_stat: Fixup syscall error reporting

In 2008 a patch was written that introduced ctypes.get_errno() and
set_errno() as official interfaces to the libc errno variable. Using
them we can avoid accessing private libc variables.
The patch was included in python 2.6.

Also we need to raise the right exception, with the right parameters
and a helpful message.

Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Message-Id: <1452525484-32309-14-git-send-email-frankja@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/kvm/kvm_stat