Skip to content

Commit

Permalink
[SCSI] zfcp: Introduce printf helper functions for debug trace.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin Peschke authored and James Bottomley committed Apr 7, 2008
1 parent b75db73 commit 10223c6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions drivers/s390/scsi/zfcp_dbf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 10223c6

Please sign in to comment.