aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMartin Peschke <mp3@de.ibm.com>2008-03-27 09:21:59 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-07 13:19:04 -0400
commit10223c60daf226ee2248b772892abc83cd875aa7 (patch)
tree418b500cba306cbec29ae228812aa3b20d490aa7 /drivers
parentb75db73159ccffaf60a67896fdfed3856b1f65e3 (diff)
[SCSI] zfcp: Introduce printf helper functions for debug trace.
Introducing helper functions that allow for code simpfifications. Signed-off-by: Martin Peschke <mp3@de.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/scsi/zfcp_dbf.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
index 658053c74707..453343783990 100644
--- a/drivers/s390/scsi/zfcp_dbf.c
+++ b/drivers/s390/scsi/zfcp_dbf.c
@@ -95,6 +95,22 @@ zfcp_dbf_view(char *out_buf, const char *label, const char *format, ...)
95 return len; 95 return len;
96} 96}
97 97
98static void zfcp_dbf_outs(char **buf, const char *s1, const char *s2)
99{
100 *buf += sprintf(*buf, "%-24s%s\n", s1, s2);
101}
102
103static void zfcp_dbf_out(char **buf, const char *s, const char *format, ...)
104{
105 va_list arg;
106
107 *buf += sprintf(*buf, "%-24s", s);
108 va_start(arg, format);
109 *buf += vsprintf(*buf, format, arg);
110 va_end(arg);
111 *buf += sprintf(*buf, "\n");
112}
113
98static int 114static int
99zfcp_dbf_view_dump(char *out_buf, const char *label, 115zfcp_dbf_view_dump(char *out_buf, const char *label,
100 char *buffer, int buflen, int offset, int total_size) 116 char *buffer, int buflen, int offset, int total_size)