pc_serial: cleanup, no functional changes
- Improve readability of code to detect serial debug - Rename usb_serial_* functions to pc_serial_* (code was copied from the USB serial driver)
This commit is contained in:
parent
af5001925e
commit
bb0d0ea2e3
@ -524,9 +524,7 @@ scan_isa_hardcoded()
|
||||
{
|
||||
#ifdef HANDLE_ISA_COM
|
||||
int i;
|
||||
bool serialDebug = true;
|
||||
|
||||
serialDebug = get_safemode_boolean("serial_debug_output", serialDebug);
|
||||
bool serialDebug = get_safemode_boolean("serial_debug_output", true);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
// skip the port used for kernel debugging...
|
||||
|
@ -70,7 +70,7 @@ create_log_file()
|
||||
|
||||
|
||||
void
|
||||
usb_serial_trace(bool force, const char *format, ...)
|
||||
pc_serial_trace(bool force, const char *format, ...)
|
||||
{
|
||||
if (!gLogEnabled && !force)
|
||||
return;
|
||||
|
@ -10,20 +10,20 @@
|
||||
|
||||
void load_settings();
|
||||
void create_log_file();
|
||||
void usb_serial_trace(bool force, const char *format, ...);
|
||||
void pc_serial_trace(bool force, const char *format, ...);
|
||||
|
||||
#define TRACE_ALWAYS(x...) usb_serial_trace(true, x);
|
||||
#define TRACE(x...) usb_serial_trace(false, x);
|
||||
#define TRACE_ALWAYS(x...) pc_serial_trace(true, x);
|
||||
#define TRACE(x...) pc_serial_trace(false, x);
|
||||
|
||||
extern bool gLogFunctionCalls;
|
||||
#define TRACE_FUNCALLS(x...) \
|
||||
if (gLogFunctionCalls) \
|
||||
usb_serial_trace(false, x);
|
||||
pc_serial_trace(false, x);
|
||||
|
||||
extern bool gLogFunctionReturns;
|
||||
#define TRACE_FUNCRET(x...) \
|
||||
if (gLogFunctionReturns) \
|
||||
usb_serial_trace(false, x);
|
||||
pc_serial_trace(false, x);
|
||||
|
||||
extern bool gLogFunctionResults;
|
||||
#define TRACE_FUNCRES(func, param) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user