]> xenbits.xensource.com Git - libvirt.git/commitdiff
virSysinfoRead: Simplify #ifdef underbush
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 7 May 2019 14:10:21 +0000 (16:10 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 10 May 2019 11:54:26 +0000 (13:54 +0200)
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virsysinfo.c

index 79a935b90aaf551fb40ab46acaa754734ef8295e..9e60d1a553667204503d4a87b95eb4838f578695 100644 (file)
@@ -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 */
 }