Home | History | Annotate | Line # | Download | only in acpica
OsdStream.c revision 1.1
      1  1.1  kochi /*	$NetBSD: OsdStream.c,v 1.1 2006/03/23 13:41:13 kochi Exp $	*/
      2  1.1  kochi 
      3  1.1  kochi /*
      4  1.1  kochi  * Copyright 2001 Wasabi Systems, Inc.
      5  1.1  kochi  * All rights reserved.
      6  1.1  kochi  *
      7  1.1  kochi  * Written by Jason R. Thorpe for Wasabi Systems, Inc.
      8  1.1  kochi  *
      9  1.1  kochi  * Redistribution and use in source and binary forms, with or without
     10  1.1  kochi  * modification, are permitted provided that the following conditions
     11  1.1  kochi  * are met:
     12  1.1  kochi  * 1. Redistributions of source code must retain the above copyright
     13  1.1  kochi  *    notice, this list of conditions and the following disclaimer.
     14  1.1  kochi  * 2. Redistributions in binary form must reproduce the above copyright
     15  1.1  kochi  *    notice, this list of conditions and the following disclaimer in the
     16  1.1  kochi  *    documentation and/or other materials provided with the distribution.
     17  1.1  kochi  * 3. All advertising materials mentioning features or use of this software
     18  1.1  kochi  *    must display the following acknowledgement:
     19  1.1  kochi  *	This product includes software developed for the NetBSD Project by
     20  1.1  kochi  *	Wasabi Systems, Inc.
     21  1.1  kochi  * 4. The name of Wasabi Systems, Inc. may not be used to endorse
     22  1.1  kochi  *    or promote products derived from this software without specific prior
     23  1.1  kochi  *    written permission.
     24  1.1  kochi  *
     25  1.1  kochi  * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
     26  1.1  kochi  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     27  1.1  kochi  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     28  1.1  kochi  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
     29  1.1  kochi  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     30  1.1  kochi  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     31  1.1  kochi  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     32  1.1  kochi  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     33  1.1  kochi  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     34  1.1  kochi  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     35  1.1  kochi  * POSSIBILITY OF SUCH DAMAGE.
     36  1.1  kochi  */
     37  1.1  kochi 
     38  1.1  kochi /*
     39  1.1  kochi  * OS Services Layer
     40  1.1  kochi  *
     41  1.1  kochi  * 6.6: Stream I/O
     42  1.1  kochi  */
     43  1.1  kochi 
     44  1.1  kochi #include <sys/cdefs.h>
     45  1.1  kochi __KERNEL_RCSID(0, "$NetBSD: OsdStream.c,v 1.1 2006/03/23 13:41:13 kochi Exp $");
     46  1.1  kochi 
     47  1.1  kochi #include "opt_ddb.h"
     48  1.1  kochi 
     49  1.1  kochi #include <sys/types.h>
     50  1.1  kochi #include <sys/systm.h>
     51  1.1  kochi 
     52  1.1  kochi #include <dev/acpi/acpica.h>
     53  1.1  kochi 
     54  1.1  kochi #ifdef DDB
     55  1.1  kochi #include <ddb/db_output.h>
     56  1.1  kochi #endif
     57  1.1  kochi 
     58  1.1  kochi extern int acpi_indebugger;
     59  1.1  kochi 
     60  1.1  kochi /*
     61  1.1  kochi  * AcpiOsPrintf:
     62  1.1  kochi  *
     63  1.1  kochi  *	Formatted stream output.
     64  1.1  kochi  */
     65  1.1  kochi void ACPI_INTERNAL_VAR_XFACE
     66  1.1  kochi AcpiOsPrintf(const char *Format, ...)
     67  1.1  kochi {
     68  1.1  kochi 
     69  1.1  kochi 	va_list ap;
     70  1.1  kochi 
     71  1.1  kochi 	va_start(ap, Format);
     72  1.1  kochi 	AcpiOsVprintf(Format, ap);
     73  1.1  kochi 	va_end(ap);
     74  1.1  kochi }
     75  1.1  kochi 
     76  1.1  kochi void
     77  1.1  kochi AcpiOsVprintf(const char *Format, va_list Args)
     78  1.1  kochi {
     79  1.1  kochi 
     80  1.1  kochi #ifdef DDB
     81  1.1  kochi 	if (acpi_indebugger)
     82  1.1  kochi 		db_vprintf(Format, Args);
     83  1.1  kochi 	else
     84  1.1  kochi #endif
     85  1.1  kochi 		vprintf(Format, Args);
     86  1.1  kochi }
     87