With the declaration in libkvm.h this time:
>From 8313b87bcab415746e6eed86ac3f5b6c562b9764 Mon Sep 17 00:00:00 2001
From: Amit Shah <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
---
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
--- 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
--- a/libkvm/libkvm.h
+++ b/libkvm/libkvm.h
@@ -509,6 +509,13 @@ int kvm_get_lapic(kvm_context_t kvm, int vcpu, struct
kvm_lapic_state *s);
*/
int kvm_set_lapic(kvm_context_t kvm, int vcpu, struct kvm_lapic_state *s);
+/*!
+ * \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
#endif
--
1.4.4.2
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel