xref: /onnv-gate/usr/src/cmd/mdb/common/modules/libnvpair/libnvpair.c (revision 2869:324151eecd58)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*2869Sgavinm  * Common Development and Distribution License (the "License").
6*2869Sgavinm  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*2869Sgavinm  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23789Sahrens  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
270Sstevel@tonic-gate 
280Sstevel@tonic-gate #include <mdb/mdb_modapi.h>
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #include "../genunix/nvpair.h"
310Sstevel@tonic-gate 
320Sstevel@tonic-gate static const mdb_dcmd_t dcmds[] = {
330Sstevel@tonic-gate 	{ NVPAIR_DCMD_NAME, NVPAIR_DCMD_USAGE, NVPAIR_DCMD_DESCR,
340Sstevel@tonic-gate 		nvpair_print },
35789Sahrens 	{ NVLIST_DCMD_NAME, NVLIST_DCMD_USAGE, NVLIST_DCMD_DESCR,
36*2869Sgavinm 		print_nvlist },
370Sstevel@tonic-gate 	{ NULL }
380Sstevel@tonic-gate };
390Sstevel@tonic-gate 
400Sstevel@tonic-gate static const mdb_walker_t walkers[] = {
410Sstevel@tonic-gate 	{ NVPAIR_WALKER_NAME, NVPAIR_WALKER_DESCR,
420Sstevel@tonic-gate 		nvpair_walk_init, nvpair_walk_step, NULL },
430Sstevel@tonic-gate 	{ NULL }
440Sstevel@tonic-gate };
450Sstevel@tonic-gate 
460Sstevel@tonic-gate static const mdb_modinfo_t modinfo = {
470Sstevel@tonic-gate 	MDB_API_VERSION, dcmds, walkers
480Sstevel@tonic-gate };
490Sstevel@tonic-gate 
500Sstevel@tonic-gate const mdb_modinfo_t *
_mdb_init(void)510Sstevel@tonic-gate _mdb_init(void)
520Sstevel@tonic-gate {
530Sstevel@tonic-gate 	return (&modinfo);
540Sstevel@tonic-gate }
55