From: <vl...@us...> - 2007-12-24 10:20:26
|
Revision: 238 http://scst.svn.sourceforge.net/scst/?rev=238&view=rev Author: vlnb Date: 2007-12-24 02:20:18 -0800 (Mon, 24 Dec 2007) Log Message: ----------- Patches from Arne Redlich <ag...@po...>: 1. The kernel's log level is a string, so strcmp needs to be used for comparisons. 2. Svn HEAD doesn't compile against kernel versions < 2.6.19 because "bool" had its debut only in 2.6.19. Here's a quick fix. 3. Iscsi-scstd dies with SIGPIPE if run in foreground mode because the reading end of the init_report_pipe is already closed in this mode. Modified Paths: -------------- trunk/iscsi-scst/usr/iscsi_scstd.c trunk/scst/include/scsi_tgt.h trunk/scst/include/scst_debug.h Modified: trunk/iscsi-scst/usr/iscsi_scstd.c =================================================================== --- trunk/iscsi-scst/usr/iscsi_scstd.c 2007-12-21 19:10:40 UTC (rev 237) +++ trunk/iscsi-scst/usr/iscsi_scstd.c 2007-12-24 10:20:18 UTC (rev 238) @@ -454,7 +454,10 @@ 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) { Modified: trunk/scst/include/scsi_tgt.h =================================================================== --- trunk/scst/include/scsi_tgt.h 2007-12-21 19:10:40 UTC (rev 237) +++ trunk/scst/include/scsi_tgt.h 2007-12-24 10:20:18 UTC (rev 238) @@ -36,6 +36,10 @@ #include <scst_const.h> +#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)) Modified: trunk/scst/include/scst_debug.h =================================================================== --- trunk/scst/include/scst_debug.h 2007-12-21 19:10:40 UTC (rev 237) +++ trunk/scst/include/scst_debug.h 2007-12-24 10:20:18 UTC (rev 238) @@ -282,7 +282,7 @@ #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 @@ #define PRINT_INFO(format, args...) \ do { \ - if (INFO_FLAG != LOG_FLAG) \ + if (strcmp(INFO_FLAG, LOG_FLAG)) \ { \ PRINT_LOG_FLAG(LOG_FLAG, format, args); \ } \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |