summaryrefslogtreecommitdiff
path: root/net/rds/af_rds.c
diff options
context:
space:
mode:
authorZach Brown <zach.brown@oracle.com>2010-08-03 13:52:47 -0700
committerAndy Grover <andy.grover@oracle.com>2010-09-08 18:16:50 -0700
commit59f740a6aeb2cde2f79fe0df38262d4c1ef35cd8 (patch)
treee05c12cc5c8892bcca3928deb62121b1ee4cedd0 /net/rds/af_rds.c
parent4518071ac1bcb76c64a55a3fddb39fb3d39add41 (diff)
downloadlwn-59f740a6aeb2cde2f79fe0df38262d4c1ef35cd8.tar.gz
lwn-59f740a6aeb2cde2f79fe0df38262d4c1ef35cd8.zip
RDS/IB: print string constants in more places
This prints the constant identifier for work completion status and rdma cm event types, like we already do for IB event types. A core string array helper is added that each string type uses. Signed-off-by: Zach Brown <zach.brown@oracle.com>
Diffstat (limited to 'net/rds/af_rds.c')
-rw-r--r--net/rds/af_rds.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/rds/af_rds.c b/net/rds/af_rds.c
index 8e3886d353b5..bb6ad81b671d 100644
--- a/net/rds/af_rds.c
+++ b/net/rds/af_rds.c
@@ -40,6 +40,15 @@
#include "rds.h"
+char *rds_str_array(char **array, size_t elements, size_t index)
+{
+ if ((index < elements) && array[index])
+ return array[index];
+ else
+ return "unknown";
+}
+EXPORT_SYMBOL(rds_str_array);
+
/* this is just used for stats gathering :/ */
static DEFINE_SPINLOCK(rds_sock_lock);
static unsigned long rds_sock_count;