]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
sysinfo: Don't try to run dmidecode on archs missing it
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 20 Jul 2011 15:03:17 +0000 (17:03 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 20 Jul 2011 15:14:24 +0000 (17:14 +0200)
DMI table is Intel & Intel-compatible specific. Therefore other
architectures miss dmidecode command. So we always fail in searching
for that command on non-Intel architectures.

src/util/sysinfo.c

index 2c8e687304687cf3e08824d469ed4afb688bba74..6625cae91789ceab940eb2d9e0d784e3051d36ba 100644 (file)
@@ -113,7 +113,10 @@ void virSysinfoDefFree(virSysinfoDefPtr def)
  *
  * Returns: a filled up sysinfo structure or NULL in case of error
  */
-#ifdef WIN32
+#if defined(WIN32) || \
+    !(defined(__x86_64__) || \
+      defined(__i386__) ||   \
+      defined(__amd64__))
 virSysinfoDefPtr
 virSysinfoRead(void) {
     /*
@@ -125,7 +128,7 @@ virSysinfoRead(void) {
     return NULL;
 }
 
-#else /* !WIN32 */
+#else /* !WIN32 && x86 */
 
 static char *
 virSysinfoParseBIOS(char *base, virSysinfoDefPtr ret)
@@ -509,7 +512,7 @@ no_memory:
     ret = NULL;
     goto cleanup;
 }
-#endif /* !WIN32 */
+#endif /* !WIN32 && x86 */
 
 static void
 virSysinfoBIOSFormat(virSysinfoDefPtr def, const char *prefix,