[Spice-commits] common/vdcommon.cpp common/vdcommon.h
Frediano Ziglio
fziglio at kemper.freedesktop.org
Wed Aug 10 10:20:37 UTC 2016
common/vdcommon.cpp | 6 +++---
common/vdcommon.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 71f6d00a783406f8b6edba84bc375fc6e3d45589
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Wed Aug 10 08:15:52 2016 +0100
Use enumeration for supported_system_version return type
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Victor Toso <victortoso at redhat.com>
diff --git a/common/vdcommon.cpp b/common/vdcommon.cpp
index f5311e3..36faa2d 100644
--- a/common/vdcommon.cpp
+++ b/common/vdcommon.cpp
@@ -19,7 +19,7 @@
#include "vdcommon.h"
-int supported_system_version()
+SystemVersion supported_system_version()
{
OSVERSIONINFOEX osvi;
@@ -27,14 +27,14 @@ int supported_system_version()
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
if (!GetVersionEx((OSVERSIONINFO*)&osvi)) {
vd_printf("GetVersionEx() failed: %lu", GetLastError());
- return 0;
+ return SYS_VER_UNSUPPORTED;
}
if (osvi.dwMajorVersion == 5 && (osvi.dwMinorVersion == 1 || osvi.dwMinorVersion == 2)) {
return SYS_VER_WIN_XP_CLASS;
} else if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion >= 0 && osvi.dwMinorVersion <= 2) {
return SYS_VER_WIN_7_CLASS;
}
- return 0;
+ return SYS_VER_UNSUPPORTED;
}
#ifndef HAVE_STRCAT_S
diff --git a/common/vdcommon.h b/common/vdcommon.h
index c5f6e93..f4859e2 100644
--- a/common/vdcommon.h
+++ b/common/vdcommon.h
@@ -105,7 +105,7 @@ enum SystemVersion {
SYS_VER_WIN_7_CLASS, // also Windows 8, Server 2012, Server 2008/R2 & Vista
};
-int supported_system_version();
+SystemVersion supported_system_version();
#endif
More information about the Spice-commits
mailing list