[openib-general] [PATCH] better warning about libsdp.conf location

Grant Grundler iod00d at hp.com
Sat Dec 10 19:23:47 PST 2005


Michael,
When LIBSDP_DEFAULT_CONFIG_FILE isn't set, the default location
lidsdp looks for libsdp.conf doesn't match where the Makefile
installs it (sysconfdir = /usr/local/etc).

Patch below also provides a _useful_ warning message by indicating
*why* we are warning the user and the default location (which might
vary by release).

It just occurred to me that libsdp could set LIBSDP_CONFIG_FILE
so the warning doesn't appear on the next invocation.
Oh well, idea for another patch...

thanks,
grant

Signed-off-by: Grant Grundler <iod00d at hp.com>

Index: src/userspace/libsdp/src/port.c
===================================================================
--- src/userspace/libsdp/src/port.c	(revision 4356)
+++ src/userspace/libsdp/src/port.c	(working copy)
@@ -1202,8 +1202,9 @@
   if (config_file) {
     __sdp_read_config(config_file);
   } else {
-      printf("default libsdp configuration is used\n");
-#define LIBSDP_DEFAULT_CONFIG_FILE  "/usr/local/ibgd/etc/libsdp.conf"
+#define LIBSDP_DEFAULT_CONFIG_FILE  "/usr/local/etc/libsdp.conf"
+      printf("libsdp.so: $LIBSDP_CONFIG_FILE not set. Using "
+					 LIBSDP_DEFAULT_CONFIG_FILE "\n");
     __sdp_read_config(LIBSDP_DEFAULT_CONFIG_FILE);
   }
 } /* __sdp_init */



More information about the general mailing list