[libvirt] [PATCH] udev: Don't try to dump DMI on non-intel archs

Michal Privoznik mprivozn at redhat.com
Tue Jul 19 14:52:55 UTC 2011


DMI is Intel & Intel-compatible specific. Don't try to dump information
on non-compatible architectures, which results only in error message in
logs.
---
NB: libsmbios is exclusively for x86_64 ia64 %{ix86}

 src/node_device/node_device_udev.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index a6b5b2e..2c5d016 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1477,6 +1477,8 @@ out:
 }
 
 
+/* DMI is intel-compatible specific */
+#if defined(__x86_64__) || defined(__i386__) || defined(__amd64__)
 static void
 udevGetDMIData(union _virNodeDevCapData *data)
 {
@@ -1549,6 +1551,7 @@ out:
     }
     return;
 }
+#endif
 
 
 static int udevSetupSystemDev(void)
@@ -1573,7 +1576,9 @@ static int udevSetupSystemDev(void)
         goto out;
     }
 
+#if defined(__x86_64__) || defined(__i386__) || defined(__amd64__)
     udevGetDMIData(&def->caps->data);
+#endif
 
     dev = virNodeDeviceAssignDef(&driverState->devs, def);
     if (dev == NULL) {
-- 
1.7.5.rc3




More information about the libvir-list mailing list