[openib-general] [PATCH] fix CA type name truncation

Tom Duffy tduffy at sun.com
Thu Dec 23 13:46:23 PST 2004


Increase the size of ca_type to accommodate string printed out of ARBEL
in TAVOR compat mode.

Before:
[root at flopteron2 bin]# ./ibstat
CA 'mthca0':
        CA type: MT25208 (MT23108 coma0
<snip>

After:
[root at flopteron2 bin]# ./ibstat
CA 'mthca0':
        CA type: MT25208 (MT23108 compat mode)
<snip>

Note: there is still a bug (probably in sys_read_string()) that does not
zero out the last character, thus the a0 is printed (which is the next
string in the struct).

Index: gen2/trunk/src/userspace/include/umad.h
===================================================================
--- gen2/trunk/src/userspace/include/umad.h	(revision 1376)
+++ gen2/trunk/src/userspace/include/umad.h	(working copy)
@@ -68,7 +68,7 @@
 	char ca_name[UMAD_CA_NAME_LEN];
 	int numports;
 	char fw_ver[20];
-	char ca_type[20];
+	char ca_type[40];
 	char hw_ver[20];
 	uint64_t node_guid;
 	uint64_t system_guid;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20041223/8ed610dc/attachment.sig>


More information about the general mailing list