1*84ab085aSmws /*
2*84ab085aSmws * CDDL HEADER START
3*84ab085aSmws *
4*84ab085aSmws * The contents of this file are subject to the terms of the
5*84ab085aSmws * Common Development and Distribution License, Version 1.0 only
6*84ab085aSmws * (the "License"). You may not use this file except in compliance
7*84ab085aSmws * with the License.
8*84ab085aSmws *
9*84ab085aSmws * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*84ab085aSmws * or http://www.opensolaris.org/os/licensing.
11*84ab085aSmws * See the License for the specific language governing permissions
12*84ab085aSmws * and limitations under the License.
13*84ab085aSmws *
14*84ab085aSmws * When distributing Covered Code, include this CDDL HEADER in each
15*84ab085aSmws * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*84ab085aSmws * If applicable, add the following below this CDDL HEADER, with the
17*84ab085aSmws * fields enclosed by brackets "[]" replaced with your own identifying
18*84ab085aSmws * information: Portions Copyright [yyyy] [name of copyright owner]
19*84ab085aSmws *
20*84ab085aSmws * CDDL HEADER END
21*84ab085aSmws */
22*84ab085aSmws
23*84ab085aSmws /*
24*84ab085aSmws * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
25*84ab085aSmws * Use is subject to license terms.
26*84ab085aSmws */
27*84ab085aSmws
28*84ab085aSmws #pragma ident "%Z%%M% %I% %E% SMI"
29*84ab085aSmws
30*84ab085aSmws #include <sys/smbios_impl.h>
31*84ab085aSmws #include <sys/cmn_err.h>
32*84ab085aSmws #include <sys/varargs.h>
33*84ab085aSmws #include <sys/systm.h>
34*84ab085aSmws #include <sys/kmem.h>
35*84ab085aSmws
36*84ab085aSmws /*ARGSUSED*/
37*84ab085aSmws const char *
smb_strerror(int err)38*84ab085aSmws smb_strerror(int err)
39*84ab085aSmws {
40*84ab085aSmws return (NULL);
41*84ab085aSmws }
42*84ab085aSmws
43*84ab085aSmws void *
smb_alloc(size_t len)44*84ab085aSmws smb_alloc(size_t len)
45*84ab085aSmws {
46*84ab085aSmws return (kmem_alloc(len, KM_SLEEP));
47*84ab085aSmws }
48*84ab085aSmws
49*84ab085aSmws void *
smb_zalloc(size_t len)50*84ab085aSmws smb_zalloc(size_t len)
51*84ab085aSmws {
52*84ab085aSmws return (kmem_zalloc(len, KM_SLEEP));
53*84ab085aSmws }
54*84ab085aSmws
55*84ab085aSmws void
smb_free(void * buf,size_t len)56*84ab085aSmws smb_free(void *buf, size_t len)
57*84ab085aSmws {
58*84ab085aSmws kmem_free(buf, len);
59*84ab085aSmws }
60*84ab085aSmws
61*84ab085aSmws /*PRINTFLIKE2*/
62*84ab085aSmws void
smb_dprintf(smbios_hdl_t * shp,const char * format,...)63*84ab085aSmws smb_dprintf(smbios_hdl_t *shp, const char *format, ...)
64*84ab085aSmws {
65*84ab085aSmws va_list ap;
66*84ab085aSmws
67*84ab085aSmws if (!(shp->sh_flags & SMB_FL_DEBUG))
68*84ab085aSmws return;
69*84ab085aSmws
70*84ab085aSmws va_start(ap, format);
71*84ab085aSmws vcmn_err(CE_CONT, format, ap);
72*84ab085aSmws va_end(ap);
73*84ab085aSmws }
74