[tip:tools/kvm] kvm tools: don't die if sdl wasn' t compiled in and we don't try using it

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

 



Commit-ID:  07eaa970f12ee19d6649cd50d78fcdeed3a7c26b
Gitweb:     http://git.kernel.org/tip/07eaa970f12ee19d6649cd50d78fcdeed3a7c26b
Author:     Sasha Levin <levinsasha928@xxxxxxxxx>
AuthorDate: Mon, 17 Sep 2012 13:16:01 +0200
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Tue, 18 Sep 2012 10:56:52 +0300

kvm tools: don't die if sdl wasn't compiled in and we don't try using it

If SDL isn't compiled in we shouldn't die unless we actually try using it.

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

diff --git a/tools/kvm/include/kvm/sdl.h b/tools/kvm/include/kvm/sdl.h
index 19e1d74..2f0c213 100644
--- a/tools/kvm/include/kvm/sdl.h
+++ b/tools/kvm/include/kvm/sdl.h
@@ -11,11 +11,17 @@ int sdl__exit(struct kvm *kvm);
 #else
 static inline int sdl__init(struct kvm *kvm)
 {
-	die("SDL support not compiled in. (install the SDL-dev[el] package)");
+	if (kvm->cfg.sdl)
+		die("SDL support not compiled in. (install the SDL-dev[el] package)");
+
+	return 0;
 }
 static inline int sdl__exit(struct kvm *kvm)
 {
-	die("SDL support not compiled in. (install the SDL-dev[el] package)");
+	if (kvm->cfg.sdl)
+		die("SDL support not compiled in. (install the SDL-dev[el] package)");
+
+	return 0;
 }
 #endif
 
--
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