]> err.no Git - linux-2.6/commitdiff
[SCSI] zfcp: Introduce printf helper functions for debug trace.
authorMartin Peschke <mp3@de.ibm.com>
Thu, 27 Mar 2008 13:21:59 +0000 (14:21 +0100)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 7 Apr 2008 17:19:04 +0000 (12:19 -0500)
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>
drivers/s390/scsi/zfcp_dbf.c

index 658053c74707cabf0104585be64ed009f6257a07..453343783990e27bb5176a06f4036f7d4ebc5d44 100644 (file)
@@ -95,6 +95,22 @@ zfcp_dbf_view(char *out_buf, const char *label, const char *format, ...)
        return len;
 }
 
+static void zfcp_dbf_outs(char **buf, const char *s1, const char *s2)
+{
+       *buf += sprintf(*buf, "%-24s%s\n", s1, s2);
+}
+
+static void zfcp_dbf_out(char **buf, const char *s, const char *format, ...)
+{
+       va_list arg;
+
+       *buf += sprintf(*buf, "%-24s", s);
+       va_start(arg, format);
+       *buf += vsprintf(*buf, format, arg);
+       va_end(arg);
+       *buf += sprintf(*buf, "\n");
+}
+
 static int
 zfcp_dbf_view_dump(char *out_buf, const char *label,
                   char *buffer, int buflen, int offset, int total_size)