diff --git a/iscsi-scst/usr/iscsi_scstd.c b/iscsi-scst/usr/iscsi_scstd.c index d9bacdbcc..2ff27476b 100644 --- a/iscsi-scst/usr/iscsi_scstd.c +++ b/iscsi-scst/usr/iscsi_scstd.c @@ -454,7 +454,10 @@ static void event_loop(int timeout) close(init_report_pipe[0]); res = 0; - write(init_report_pipe[1], &res, sizeof(res)); + + if (log_daemon) + write(init_report_pipe[1], &res, sizeof(res)); + close(init_report_pipe[1]); while (1) { diff --git a/scst/include/scsi_tgt.h b/scst/include/scsi_tgt.h index 4f25a7e03..58e9f4ca4 100644 --- a/scst/include/scsi_tgt.h +++ b/scst/include/scsi_tgt.h @@ -36,6 +36,10 @@ #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) +typedef _Bool bool; +#endif + /* Version numbers, the same as for the kernel */ #define SCST_VERSION_CODE 0x000906 #define SCST_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) diff --git a/scst/include/scst_debug.h b/scst/include/scst_debug.h index 995dae1b4..037d43dd4 100644 --- a/scst/include/scst_debug.h +++ b/scst/include/scst_debug.h @@ -282,7 +282,7 @@ do { \ #define PRINT_ERROR(format, args...) \ do { \ - if (ERROR_FLAG != LOG_FLAG) \ + if (strcmp(ERROR_FLAG, LOG_FLAG)) \ { \ PRINT_LOG_FLAG(LOG_FLAG, "***ERROR*** " format, args); \ } \ @@ -291,7 +291,7 @@ do { \ #define PRINT_INFO(format, args...) \ do { \ - if (INFO_FLAG != LOG_FLAG) \ + if (strcmp(INFO_FLAG, LOG_FLAG)) \ { \ PRINT_LOG_FLAG(LOG_FLAG, format, args); \ } \