[tip:tools/kvm] kvm tools: Repair running on non ioeventfd-capable platforms

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

 



Commit-ID:  44287ddffd44815970aa3d5de5acbc205c3a069c
Gitweb:     http://git.kernel.org/tip/44287ddffd44815970aa3d5de5acbc205c3a069c
Author:     Matt Evans <matt@xxxxxxxxxx>
AuthorDate: Tue, 31 Jan 2012 17:30:41 +1100
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Tue, 31 Jan 2012 08:58:17 +0200

kvm tools: Repair running on non ioeventfd-capable platforms

Commit d3923126a24212f1e746a84a575dadbd9f259418 added a bunch of
nice error checking around ioevent__init() but the init may gracefully
fail if ioevents simply aren't supported (PPC64 KVM).

This commit adds a new return code for the init -- positive, but
identifiable as 'not success 0'.

Signed-off-by: Matt Evans <matt@xxxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/ioeventfd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/kvm/ioeventfd.c b/tools/kvm/ioeventfd.c
index 9133101..f2d5a30 100644
--- a/tools/kvm/ioeventfd.c
+++ b/tools/kvm/ioeventfd.c
@@ -67,7 +67,7 @@ int ioeventfd__init(struct kvm *kvm)
 
 	ioeventfd_avail = kvm__supports_extension(kvm, KVM_CAP_IOEVENTFD);
 	if (!ioeventfd_avail)
-		return -ENOSYS;
+		return 1; /* Not fatal, but let caller determine no-go. */
 
 	epoll_fd = epoll_create(IOEVENTFD_MAX_EVENTS);
 	if (epoll_fd < 0)
--
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