diff options
author | Zach Brown <zach.brown@oracle.com> | 2010-08-04 00:52:47 +0400 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-09 05:16:50 +0400 |
commit | 59f740a6aeb2cde2f79fe0df38262d4c1ef35cd8 (patch) | |
tree | e05c12cc5c8892bcca3928deb62121b1ee4cedd0 /net/rds/af_rds.c | |
parent | 4518071ac1bcb76c64a55a3fddb39fb3d39add41 (diff) | |
download | linux-59f740a6aeb2cde2f79fe0df38262d4c1ef35cd8.tar.xz |
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.c | 9 |
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; |