aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <roland@topspin.com>2005-04-29 16:41:52 +0000
committerRoland Dreier <rolandd@cisco.com>2006-11-09 11:35:56 -0800
commit9ff9391e6581577d46124cc5b64c1581c62998fe (patch)
treecfb4836971c667faf3e5182322292c31e57ee995
parentc91ae04870b226aea52b3d1080e93f44094c57c9 (diff)
downloadlibibverbs-9ff9391e6581577d46124cc5b64c1581c62998fe.tar.gz
Update error messages
Update error messages in libibverbs init so they're easier to understand, as suggested by Grant Grundler.
-rw-r--r--src/init.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/init.c b/src/init.c
index fed536f..4fc6d37 100644
--- a/src/init.c
+++ b/src/init.c
@@ -51,6 +51,7 @@
Dlist *device_list;
static char default_path[] = DRIVER_PATH;
+static const char *user_path;
static Dlist *driver_list;
@@ -146,7 +147,11 @@ static void init_drivers(struct sysfs_class_device *verbs_dev)
}
}
- fprintf(stderr, PFX "Warning: no driver for %s\n", verbs_dev->name);
+ fprintf(stderr, PFX "Warning: no userspace device-specific driver found for %s\n"
+ " driver search path: ", verbs_dev->name);
+ if (user_path)
+ fprintf(stderr, "%s:", user_path);
+ fprintf(stderr, "%s\n", default_path);
}
static int check_abi_version(void)
@@ -182,7 +187,6 @@ static int check_abi_version(void)
static void INIT ibverbs_init(void)
{
- const char *user_path;
char *wr_path, *dir;
struct sysfs_class *cls;
Dlist *verbs_dev_list;
@@ -214,7 +218,7 @@ static void INIT ibverbs_init(void)
cls = sysfs_open_class("infiniband_verbs");
if (!cls) {
- fprintf(stderr, PFX "Fatal: couldn't open infiniband sysfs class.\n");
+ fprintf(stderr, PFX "Fatal: couldn't open sysfs class 'infiniband_verbs'.\n");
return;
}