]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
dmi: only enable DMI for x86 platforms
authorVincent Bernat <bernat@luffy.cx>
Thu, 20 Oct 2011 06:26:35 +0000 (08:26 +0200)
committerVincent Bernat <bernat@luffy.cx>
Thu, 20 Oct 2011 06:26:35 +0000 (08:26 +0200)
CHANGELOG
src/dmi.c
src/lldpd.c
src/lldpd.h

index 6740478c3af17a60e802f98b41e292f5e9fe6a70..7451b4f161a7649b3a10074410e4de39037b0e82 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,7 +5,7 @@ lldpd (0.5.5)
     + Key/value output was incorrect when a dot was present in
       interface names. This is fixed but it is preferable to use XML
       output since the parsing is more difficult in this case.
-    + Only grab DMI information once.
+    + Only grab DMI information once. Only uses DMI for x86 platform.
 
 lldpd (0.5.4)
   * Features:
index 367ae0d0033278eee89b6dbf0d058cdde283531b..14aa895bdb29cd0e476fa1648a64039fe81ce8fa 100644 (file)
--- a/src/dmi.c
+++ b/src/dmi.c
@@ -29,6 +29,7 @@
            - asset: /sys/class/dmi/id/chassis_asset_tag
        */
 
+#if __i386__ || __amd64__
 char*
 dmi_get(char *file)
 {
@@ -90,3 +91,4 @@ dmi_asset()
        return dmi_get(SYSFS_CLASS_DMI "chassis_asset_tag");
 }
 #endif
+#endif
index a846ca64f0b1b378ea78d94fa236969b2c6b0a19..f3e0d16e844fcc2c3c939821e8df8c343df14863 100644 (file)
@@ -921,6 +921,7 @@ lldpd_send_all(struct lldpd *cfg)
 static void
 lldpd_med(struct lldpd_chassis *chassis)
 {
+#if __i386__ || __amd64__
        static short int once = 0;
        if (!once) {
                chassis->c_med_hw = dmi_hw();
@@ -931,6 +932,7 @@ lldpd_med(struct lldpd_chassis *chassis)
                chassis->c_med_asset = dmi_asset();
                once = 1;
        }
+#endif
 }
 #endif
 
index 71a9a167fbd985e4e08b310d32ebb9ebc0a6c05b..e6e619a6f3f17223841368bc93cea44d56e673df 100644 (file)
@@ -481,6 +481,7 @@ void         lldpd_ifh_mgmt(struct lldpd *, struct ifaddrs *);
 
 /* dmi.c */
 #ifdef ENABLE_LLDPMED
+#if __i386__ || __amd64__
 char   *dmi_hw(void);
 char   *dmi_fw(void);
 char   *dmi_sn(void);
@@ -488,6 +489,7 @@ char        *dmi_manuf(void);
 char   *dmi_model(void);
 char   *dmi_asset(void);
 #endif
+#endif
 
 /* log.c */
 void             log_init(int, const char *);