* Use dprintf_no_syslog() for FLOW and everything in scsi2ata.c - this prevents

endless writing to the syslog.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25237 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2008-04-29 08:11:43 +00:00
parent 0cadc931d2
commit 66cb8f0ede
3 changed files with 40 additions and 39 deletions
@@ -1,5 +1,5 @@
/* /*
* Copyright 2004-2007, Haiku, Inc. All RightsReserved. * Copyright 2004-2008, Haiku, Inc. All RightsReserved.
* Copyright 2002/03, Thomas Kurschel. All rights reserved. * Copyright 2002/03, Thomas Kurschel. All rights reserved.
* *
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
@@ -18,8 +18,8 @@
#include <string.h> #include <string.h>
#define TRACE dprintf #define TRACE dprintf_no_syslog
#define FLOW dprintf #define FLOW dprintf_no_syslog
@@ -136,7 +136,7 @@ synchronize_cache(das_device_info *device)
scsi_ccb *ccb; scsi_ccb *ccb;
err_res res; err_res res;
SHOW_FLOW0( 0, "" ); SHOW_FLOW0(0, "");
ccb = device->scsi->alloc_ccb(device->scsi_device); ccb = device->scsi->alloc_ccb(device->scsi_device);
@@ -147,6 +147,7 @@ synchronize_cache(das_device_info *device)
return res.error_code; return res.error_code;
} }
static int static int
log2(uint32 x) log2(uint32 x)
{ {
@@ -58,12 +58,12 @@
#define SHOW_FLOW(seriousness, format, param...) \ #define SHOW_FLOW(seriousness, format, param...) \
do { if( seriousness <= debug_level_flow && seriousness <= DEBUG_MAX_LEVEL_FLOW ) { \ do { if( seriousness <= debug_level_flow && seriousness <= DEBUG_MAX_LEVEL_FLOW ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT \ dprintf_no_syslog( "%s%s: "format"\n", FUNC_NAME, param ); DEBUG_WAIT \
}} while( 0 ) }} while( 0 )
#define SHOW_FLOW0(seriousness, format) \ #define SHOW_FLOW0(seriousness, format) \
do { if( seriousness <= debug_level_flow && seriousness <= DEBUG_MAX_LEVEL_FLOW ) { \ do { if( seriousness <= debug_level_flow && seriousness <= DEBUG_MAX_LEVEL_FLOW ) { \
dprintf( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT \ dprintf_no_syslog( "%s%s: "format"\n", FUNC_NAME); DEBUG_WAIT \
}} while( 0 ) }} while( 0 )
#define SHOW_INFO(seriousness, format, param...) \ #define SHOW_INFO(seriousness, format, param...) \