[PATCH 1/3] virSysinfoRead: Simplify #ifdef underbush

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

 



Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/util/virsysinfo.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c
index 79a935b90a..9e60d1a553 100644
--- a/src/util/virsysinfo.c
+++ b/src/util/virsysinfo.c
@@ -1212,13 +1212,12 @@ virSysinfoRead(void)
     return virSysinfoReadARM();
 #elif defined(__s390__) || defined(__s390x__)
     return virSysinfoReadS390();
-#elif defined(WIN32) || \
-    !(defined(__x86_64__) || \
-      defined(__i386__) || \
-      defined(__amd64__) || \
-      defined(__arm__) || \
-      defined(__aarch64__) || \
-      defined(__powerpc__))
+#elif !defined(WIN32) && \
+    (defined(__x86_64__) || \
+     defined(__i386__) || \
+     defined(__amd64__))
+    return virSysinfoReadX86();
+#else /* WIN32 || not supported arch */
     /*
      * this can probably be extracted from Windows using API or registry
      * http://www.microsoft.com/whdc/system/platform/firmware/SMBIOS.mspx
@@ -1226,9 +1225,7 @@ virSysinfoRead(void)
     virReportSystemError(ENOSYS, "%s",
                          _("Host sysinfo extraction not supported on this platform"));
     return NULL;
-#else /* !WIN32 && x86 */
-    return virSysinfoReadX86();
-#endif /* !WIN32 && x86 */
+#endif /* WIN32 || not supported arch */
 }
 
 
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux