mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 05:06:31 +00:00
Patches from Arne Redlich <agr@powerkom-dd.de>:
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. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@238 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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); \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user