diff options
author | Glauber Costa <glommer@redhat.com> | 2009-07-15 01:34:57 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2009-07-21 17:06:47 -0300 |
commit | e2e3b6959d9550e1e5db8ca2d8cc0bdcded4e32d (patch) | |
tree | c3a5daba3d84d591353df7b3fdaa83f5c33187f6 /qemu-kvm.h | |
parent | reuse kvm_vm_ioctl (diff) | |
download | qemu-kvm-e2e3b6959d9550e1e5db8ca2d8cc0bdcded4e32d.tar.gz qemu-kvm-e2e3b6959d9550e1e5db8ca2d8cc0bdcded4e32d.tar.bz2 qemu-kvm-e2e3b6959d9550e1e5db8ca2d8cc0bdcded4e32d.zip |
reuse kvm_ioctl
Start using kvm_ioctl's code.
For type safety, delete fd from kvm_context entirely, so the
compiler can play along with us helping to detect errors I might
have made.
Signed-off-by: Glauber Costa <glommer@redhat.com>
Also, we were slightly different from qemu upstream in handling error
code from ioctl, since we were always testing for -1, while kvm_vm_ioctl
returns -errno. We already did this in most of the call sites, so
this patch has the big advantage of simplifying call sites.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'qemu-kvm.h')
-rw-r--r-- | qemu-kvm.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/qemu-kvm.h b/qemu-kvm.h index b52a24913..8c9b72f45 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -52,8 +52,6 @@ extern int kvm_abi; */ struct kvm_context { - /// Filedescriptor to /dev/kvm - int fd; void *opaque; /// is dirty pages logging enabled for all regions or not int dirty_pages_log_all; @@ -1198,6 +1196,7 @@ typedef struct KVMState extern KVMState *kvm_state; +int kvm_ioctl(KVMState *s, int type, ...); int kvm_vm_ioctl(KVMState *s, int type, ...); #endif |