From: Hannes Reinecke Date: Wed, 12 Jan 2011 09:07:58 +0000 (+0100) Subject: libmultipath: Improve debugging of log messages X-Git-Tag: upstream/0.5.0~106^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=155f87ade05e27205329f4e833212d330c60b293;p=platform%2Fupstream%2Fmultipath-tools.git libmultipath: Improve debugging of log messages With the current definition of log messages we only see something utterly pointless when using gdb: (gdb) print *(struct logmsg *)la->buff $15 = {prio = 6, next = 0x80015a68, str = 0x73687574646f776e
} With this fix we are able to see the message directly: (gdb) print *(struct logmsg *)la->buff $6 = {prio = 5, next = 0x8001b220, str = 0x8001d240 "--------shut down-------\n"} References: bnc#659859 Signed-off-by: Hannes Reinecke --- diff --git a/libmultipath/log.h b/libmultipath/log.h index c697118..3fd1677 100644 --- a/libmultipath/log.h +++ b/libmultipath/log.h @@ -17,7 +17,7 @@ struct logmsg { short int prio; void * next; - char * str; + char str[0]; }; struct logarea {