From: Amit S. <ami...@qu...> - 2007-11-07 18:59:19
|
With the declaration in libkvm.h this time: =46rom 8313b87bcab415746e6eed86ac3f5b6c562b9764 Mon Sep 17 00:00:00 2001 =46rom: Amit Shah <ami...@qu...> Date: Thu, 8 Nov 2007 00:13:07 +0530 Subject: [PATCH] Add accessor for kvm->vm_fd Introduce kvm_get_vm_fd to get the VM FD Signed-off-by: Amit Shah <ami...@qu...> =2D-- libkvm/libkvm.c | 5 +++++ libkvm/libkvm.h | 7 +++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index 5c8352e..fc2c60a 100644 =2D-- a/libkvm/libkvm.c +++ b/libkvm/libkvm.c @@ -918,3 +918,8 @@ int kvm_irqchip_in_kernel(kvm_context_t kvm) { return kvm->irqchip_in_kernel; } + +int kvm_get_vm_fd(kvm_context_t kvm) +{ + return kvm->vm_fd; +} diff --git a/libkvm/libkvm.h b/libkvm/libkvm.h index b00d658..d5be0b9 100644 =2D-- a/libkvm/libkvm.h +++ b/libkvm/libkvm.h @@ -509,6 +509,13 @@ int kvm_get_lapic(kvm_context_t kvm, int vcpu, struct= =20 kvm_lapic_state *s); */ int kvm_set_lapic(kvm_context_t kvm, int vcpu, struct kvm_lapic_state *s); =20 +/*! + * \brief Return the vm_fd field from kvm_context + * + * \param kvm Pointer to the current kvm_context + */ +int kvm_get_vm_fd(kvm_context_t kvm); + #endif =20 #endif =2D-=20 1.4.4.2 |