[PATCH 5/9] dm: Fix comma printing for the case when dm_target_msg structure is inaccessible

Eugene Syromyatnikov evgsyr at gmail.com
Tue Oct 11 22:38:42 UTC 2016


---
 dm.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dm.c b/dm.c
index d846233..b1d455c 100644
--- a/dm.c
+++ b/dm.c
@@ -342,10 +342,12 @@ dm_decode_dm_target_msg(struct tcb *tcp, unsigned long addr,
 	    offset + target_msg_message_offs <= ioc->data_size) {
 		struct dm_target_msg s;
 
+		tprints(", ");
+
 		if (umove_or_printaddr(tcp, addr + offset, &s))
 			return;
 
-		tprintf(", {sector=%" PRI__u64 ", message=", s.sector);
+		tprintf("{sector=%" PRI__u64 ", message=", s.sector);
 		printstr_ex(tcp, addr + offset + target_msg_message_offs,
 			    ioc->data_size - offset - target_msg_message_offs,
 			    QUOTE_0_TERMINATED);
-- 
1.7.10.4





More information about the Strace-devel mailing list