From 992b9b2b8f04d2bd3468d1bf2ce46d47d514ea25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Tue, 19 Sep 2006 11:41:15 +0000 Subject: [PATCH] improved tracing handling git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18888 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/bus_managers/acpi/acpi_busman.c | 13 ++++++++----- src/add-ons/kernel/bus_managers/acpi/oshaiku.c | 7 +------ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c b/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c index 37205b2e15..5ee7674e66 100644 --- a/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c +++ b/src/add-ons/kernel/bus_managers/acpi/acpi_busman.c @@ -17,6 +17,9 @@ status_t acpi_std_ops(int32 op,...); status_t acpi_rescan_stub(void); +#define TRACE(x...) dprintf("acpi: " x) +#define ERROR(x...) dprintf("acpi: " x) + void enable_fixed_event (uint32 event); void disable_fixed_event (uint32 event); @@ -89,28 +92,28 @@ status_t acpi_std_ops(int32 op,...) /* Bring up ACPI */ Status = AcpiInitializeSubsystem(); if (Status != AE_OK) { - dprintf("ACPI: AcpiInitializeSubsystem() failed (%s)",AcpiFormatException(Status)); + ERROR("AcpiInitializeSubsystem() failed (%s)\n",AcpiFormatException(Status)); return B_ERROR; } Status = AcpiLoadTables(); if (Status != AE_OK) { - dprintf("ACPI: AcpiLoadTables failed (%s)",AcpiFormatException(Status)); + ERROR("AcpiLoadTables failed (%s)\n",AcpiFormatException(Status)); return B_ERROR; } Status = AcpiEnableSubsystem(ACPI_FULL_INITIALIZATION); if (Status != AE_OK) { - dprintf("ACPI: AcpiEnableSubsystem failed (%s)",AcpiFormatException(Status)); + ERROR("AcpiEnableSubsystem failed (%s)\n",AcpiFormatException(Status)); return B_ERROR; } /* Phew. Now in ACPI mode */ - dprintf("ACPI: ACPI initialized\n"); + TRACE("ACPI initialized\n"); break; case B_MODULE_UNINIT: Status = AcpiTerminate(); if (Status != AE_OK) - dprintf("Could not bring system out of ACPI mode. Oh well.\n"); + ERROR("Could not bring system out of ACPI mode. Oh well.\n"); /* This isn't so terrible. We'll just fail silently */ break; diff --git a/src/add-ons/kernel/bus_managers/acpi/oshaiku.c b/src/add-ons/kernel/bus_managers/acpi/oshaiku.c index 03d9e7ce2b..c078d43f0f 100644 --- a/src/add-ons/kernel/bus_managers/acpi/oshaiku.c +++ b/src/add-ons/kernel/bus_managers/acpi/oshaiku.c @@ -371,7 +371,6 @@ AcpiOsPrintf ( AcpiOsVprintf (Fmt, Args); va_end (Args); - return; } @@ -423,12 +422,8 @@ AcpiOsVprintf ( } #else - //char acpi_err_string[512]; - //vsprintf(acpi_err_string, Fmt, Args); - //dprintf("ACPI: %s\n",acpi_err_string); + dprintf(Fmt, Args); #endif - - return; }