FreeBSD/sys/contrib/dev/acpica/components/debugger/dbfileio.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDbOpenDebugFile
 *
 * PARAMETERS:  Name                - Filename to open
 *
 * RETURN:      None
 *
 * DESCRIPTION: Open a file where debug output will be directed.
 *
 ******************************************************************************/
AcpiDbOpenDebugFile
PARAMETERS:  Name                - Filename to open

None

Open a file where debug output will be directed.
AcpiDbOpenDebugFile PARAMETERS : Name - Filename to open None Open a file where debug output will be directed .
void
AcpiDbOpenDebugFile (
    char                    *Name)
{
#ifdef ACPI_APPLICATION
    AcpiDbCloseDebugFile ();
    AcpiGbl_DebugFile = fopen (Name, "w+");
    if (!AcpiGbl_DebugFile)
    {
        AcpiOsPrintf ("Could not open debug file %s\n", Name);
        return;
    }
    AcpiOsPrintf ("Debug output file %s opened\n", Name);
    strncpy (AcpiGbl_DbDebugFilename, Name,
        sizeof (AcpiGbl_DbDebugFilename));
    AcpiGbl_DbOutputToFile = TRUE;
#endif
}
void AcpiDbOpenDebugFile ( char * Name ) { #ifdef ACPI_APPLICATION AcpiDbCloseDebugFile ( ) ; AcpiGbl_DebugFile = fopen ( Name , " " ) ; if ( ! AcpiGbl_DebugFile ) { AcpiOsPrintf ( " \n " , Name ) ; return ; } AcpiOsPrintf ( " \n " , Name ) ; strncpy ( AcpiGbl_DbDebugFilename , Name , sizeof ( AcpiGbl_DbDebugFilename ) ) ; AcpiGbl_DbOutputToFile = TRUE ; #endif }
FUNCTION:    AcpiDbOpenDebugFile
 PARAMETERS:  Name                - Filename to open
FUNCTION : AcpiDbOpenDebugFile PARAMETERS : Name - Filename to open