DPRINTF add iscsi target_name if available

This patch adds the iscsi target name to the debug output
This commit is contained in:
Peter Lieven
2012-10-23 10:53:14 +02:00
parent afc963c312
commit c2836e2a9a

View File

@@ -959,7 +959,17 @@ iscsi_scsi_task_cancel(struct iscsi_context *iscsi,
EXTERN void
iscsi_scsi_cancel_all_tasks(struct iscsi_context *iscsi);
#define DPRINTF(iscsi,level,fmt,args...) do { if ((iscsi)->debug >= level) {fprintf(stderr,"libiscsi: ");fprintf(stderr, (fmt), ##args); fprintf(stderr,"\n");} } while (0);
#define DPRINTF(iscsi,level,fmt,args...) \
do { \
if ((iscsi)->debug >= level) { \
fprintf(stderr,"libiscsi: "); \
fprintf(stderr, (fmt), ##args); \
if (iscsi->target_name) { \
fprintf(stderr," [%s]",iscsi->target_name); \
} \
fprintf(stderr,"\n"); \
} \
} while (0);
/*
* This function is to set the debugging level (0=disabled).