[tip:tools/kvm] kvm tools: Use kvm__supports_extension instead of kvm__has_cap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  7a326b726422f9b5558554b662d43071c6e783ba
Gitweb:     http://git.kernel.org/tip/7a326b726422f9b5558554b662d43071c6e783ba
Author:     Sasha Levin <levinsasha928@xxxxxxxxx>
AuthorDate: Thu, 15 Dec 2011 08:02:54 +0200
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Thu, 15 Dec 2011 08:31:27 +0200

kvm tools: Use kvm__supports_extension instead of kvm__has_cap

kvm__supports_extension has been there before, and it's does it's job right
unlike kvm__has_cap.

Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/include/kvm/kvm.h |    1 +
 tools/kvm/ioeventfd.c       |    2 +-
 tools/kvm/kvm.c             |    2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/kvm/include/kvm/kvm.h b/tools/kvm/include/kvm/kvm.h
index 35bb400..7996dfd 100644
--- a/tools/kvm/include/kvm/kvm.h
+++ b/tools/kvm/include/kvm/kvm.h
@@ -82,5 +82,6 @@ static inline void *guest_flat_to_host(struct kvm *kvm, unsigned long offset)
 }
 
 bool kvm__has_cap(struct kvm *kvm, u32 cap);
+bool kvm__supports_extension(struct kvm *kvm, unsigned int extension);
 
 #endif /* KVM__KVM_H */
diff --git a/tools/kvm/ioeventfd.c b/tools/kvm/ioeventfd.c
index 75dd3f2..1d6a7ac 100644
--- a/tools/kvm/ioeventfd.c
+++ b/tools/kvm/ioeventfd.c
@@ -22,7 +22,7 @@ static bool	ioeventfd_avail;
 
 void ioeventfd__init(struct kvm *kvm)
 {
-	ioeventfd_avail = kvm__has_cap(kvm, KVM_CAP_IOEVENTFD);
+	ioeventfd_avail = kvm__supports_extension(kvm, KVM_CAP_IOEVENTFD);
 	if (!ioeventfd_avail)
 		return;
 
diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c
index d5cbf57..008170a 100644
--- a/tools/kvm/kvm.c
+++ b/tools/kvm/kvm.c
@@ -90,7 +90,7 @@ const char *kvm__get_dir(void)
 	return kvm_dir;
 }
 
-static bool kvm__supports_extension(struct kvm *kvm, unsigned int extension)
+bool kvm__supports_extension(struct kvm *kvm, unsigned int extension)
 {
 	int ret;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux