From ec75cd50ba89bed1f0ad74b89c9a43e87b2bd767 Mon Sep 17 00:00:00 2001 From: Jim Cromie Date: Tue, 2 Aug 2011 15:12:55 -0600 Subject: [PATCH 03/28] dynamic_debug: add space at end of non-null dynamic-prefix dynamic_emit_prefix() currently adds a space after line-number, but not otherwize. For readability, add space whenever any prefix (besides the "<7>" loglevel) has been written. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 9c8e133..122246f 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -439,7 +439,9 @@ static char *dynamic_emit_prefix(const struct _ddebug *desc, char *buf) if (desc->flags & _DPRINTK_FLAGS_INCL_FUNCNAME) pos += snprintf(buf + pos, LEFT(pos), "%s:", desc->function); if (desc->flags & _DPRINTK_FLAGS_INCL_LINENO) - pos += snprintf(buf + pos, LEFT(pos), "%d ", desc->lineno); + pos += snprintf(buf + pos, LEFT(pos), "%d:", desc->lineno); + if (pos - strlen(KERN_DEBUG)) + pos += snprintf(buf + pos, LEFT(pos), " "); return buf; } -- 1.7.4.4