[ofa-general] [PATCH 5/7] infiniband-diags/src/smpquery.c : special case situation where nodename len is >= 32

Ira Weiny weiny2 at llnl.gov
Thu Nov 1 20:15:18 PDT 2007


>From 04c67433708cb14ab384a2acfc19755998f7a8b2 Mon Sep 17 00:00:00 2001
From: Ira K. Weiny <weiny2 at llnl.gov>
Date: Thu, 1 Nov 2007 19:31:30 -0700
Subject: [PATCH] infiniband-diags/src/smpquery.c : special case situation where nodename len is >= 32

Signed-off-by: Ira K. Weiny <weiny2 at llnl.gov>
---
 infiniband-diags/src/smpquery.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/infiniband-diags/src/smpquery.c b/infiniband-diags/src/smpquery.c
index 89b48f3..0a91de1 100644
--- a/infiniband-diags/src/smpquery.c
+++ b/infiniband-diags/src/smpquery.c
@@ -114,6 +114,9 @@ node_desc(ib_portid_t *dest, char **argv, int argc)
 	if (l < 32) {
 		memset(dots, '.', 32 - l);
 		dots[32 - l] = '\0';
+	} else {
+		dots[0] = '.';
+		dots[1] = '\0';
 	}
 
 	printf("Node Description:%s%s\n", dots, nodename);
-- 
1.5.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-infiniband-diags-src-smpquery.c-special-case-situa.patch
Type: application/octet-stream
Size: 838 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20071101/6738def3/attachment.obj>


More information about the general mailing list