improved tracing handling

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18888 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2006-09-19 11:41:15 +00:00
parent 65afc3a011
commit 992b9b2b8f
2 changed files with 9 additions and 11 deletions

View File

@ -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;

View File

@ -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;
}