Whamcloud - gitweb
b=5149
authorgreen <green>
Tue, 16 Nov 2004 09:53:00 +0000 (09:53 +0000)
committergreen <green>
Tue, 16 Nov 2004 09:53:00 +0000 (09:53 +0000)
r=adilger
Update printing of pid in portals_id2str to print in correct place with correct
limit. Also updated format string to match comments elsewhere.

lnet/libcfs/debug.c
lustre/portals/libcfs/debug.c

index f571958..53f15d2 100644 (file)
@@ -288,7 +288,7 @@ char *portals_id2str(int nal, ptl_process_id_t id, char *str)
         
         portals_nid2str(nal, id.nid, str);
         len = strlen(str);
-        snprintf(str + len, PTL_NALFMT_SIZE, "-%u", id.pid);
+        snprintf(str + len, PTL_NALFMT_SIZE - len, ",%u", id.pid);
         return str;
 }
 
index f571958..53f15d2 100644 (file)
@@ -288,7 +288,7 @@ char *portals_id2str(int nal, ptl_process_id_t id, char *str)
         
         portals_nid2str(nal, id.nid, str);
         len = strlen(str);
-        snprintf(str + len, PTL_NALFMT_SIZE, "-%u", id.pid);
+        snprintf(str + len, PTL_NALFMT_SIZE - len, ",%u", id.pid);
         return str;
 }