Index: lib/ipmi_dcmi.c
===================================================================
RCS file: /cvsroot/ipmitool/ipmitool/lib/ipmi_dcmi.c,v
retrieving revision 1.6
diff -u -r1.6 ipmi_dcmi.c
--- lib/ipmi_dcmi.c	17 Jan 2013 06:54:07 -0000	1.6
+++ lib/ipmi_dcmi.c	7 Mar 2013 12:06:59 -0000
@@ -445,6 +445,11 @@
 static int
 ipmi_dcmi_prnt_oobDiscover(struct ipmi_intf * intf)
 {
+# ifndef IPMI_INTF_LANPLUS
+	lprintf(LOG_ERR,
+			"DCMI Discovery is available only when LANplus(IPMI v2.0) is enabled.");
+	return (-1);
+# else
     int rc;
 
     if (intf->opened == 0 && intf->open != NULL) {
@@ -452,11 +457,6 @@
             return (int) NULL;
     }
     
-    #ifndef IPMI_INTF_LANPLUS
-    printf("Function oobDicover unavailable when lanplus (IPMI v2) is not enabled\n");
-    return -1;
-
-    #else
 
     struct ipmi_session *s;
 
@@ -520,7 +520,7 @@
 
     //Lets ping/pong
     return ipmiv2_lan_ping(intf);
-    #endif
+# endif
 }
 /*******************************************************************************
  * This is the get DCMI Capabilities function to see what the BMC supports.    *
