diff options
| author | stevel@tonic-gate <none@none> | 2005-06-14 00:00:00 -0700 |
|---|---|---|
| committer | stevel@tonic-gate <none@none> | 2005-06-14 00:00:00 -0700 |
| commit | 7c478bd95313f5f23a4c958a745db2134aa03244 (patch) | |
| tree | c871e58545497667cbb4b0a4f2daf204743e1fe7 /usr/src/lib/libnvpair | |
| download | illumos-joyent-7c478bd95313f5f23a4c958a745db2134aa03244.tar.gz | |
OpenSolaris Launch
Diffstat (limited to 'usr/src/lib/libnvpair')
| -rw-r--r-- | usr/src/lib/libnvpair/Makefile | 68 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/Makefile.com | 75 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/amd64/Makefile | 32 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/i386/Makefile | 31 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/inc.flg | 29 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/libnvpair.c | 266 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/libnvpair.h | 46 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/llib-lnvpair | 32 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/nvpair_alloc_system.c | 59 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/sparc/Makefile | 31 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/sparcv9/Makefile | 32 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/spec/Makefile | 30 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/spec/Makefile.targ | 35 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/spec/amd64/Makefile | 42 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/spec/i386/Makefile | 42 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/spec/nvpair.spec | 703 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/spec/sparc/Makefile | 44 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/spec/sparcv9/Makefile | 43 | ||||
| -rw-r--r-- | usr/src/lib/libnvpair/spec/versions | 54 |
19 files changed, 1694 insertions, 0 deletions
diff --git a/usr/src/lib/libnvpair/Makefile b/usr/src/lib/libnvpair/Makefile new file mode 100644 index 0000000000..74a94fedbe --- /dev/null +++ b/usr/src/lib/libnvpair/Makefile @@ -0,0 +1,68 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +#ident "%Z%%M% %I% %E% SMI" +# +# Copyright (c) 2000 by Sun Microsystems, Inc. +# All rights reserved. +# +# lib/libnvpair/Makefile +# +# + +# include library definitions +include ../Makefile.lib + +SUBDIRS = spec .WAIT $(MACH) $(BUILD64) $(MACH64) + +# conditional assignments +all := TARGET= all +install := TARGET= install +clean := TARGET= clean +clobber := TARGET= clobber +lint := TARGET= lint +test := TARGET= test + +# definitions for install_h target +HDRS= libnvpair.h +ROOTHDRDIR= $(ROOT)/usr/include +ROOTHDRS= $(HDRS:%=$(ROOTHDRDIR)/%) +CHECKHDRS= $(HDRS:%.h=%.check) + +.KEEP_STATE: + +all install clean clobber lint: $(SUBDIRS) + +# install rule for install_h target + +$(ROOTHDRDIR)/%: % + $(INS.file) + +install_h: $(ROOTHDRS) + +check: $(CHECKHDRS) + +$(MACH) $(MACH64) spec: FRC + @cd $@; pwd; $(MAKE) $(TARGET) + +FRC: + diff --git a/usr/src/lib/libnvpair/Makefile.com b/usr/src/lib/libnvpair/Makefile.com new file mode 100644 index 0000000000..c2de4ef11d --- /dev/null +++ b/usr/src/lib/libnvpair/Makefile.com @@ -0,0 +1,75 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# +# lib/libnvpair/Makefile.com +# + +LIBRARY= libnvpair.a +VERS= .1 + +OBJECTS= libnvpair.o \ + nvpair_alloc_system.o \ + nvpair_alloc_fixed.o \ + nvpair.o + +include ../../Makefile.lib +include ../../Makefile.rootfs + +SRCS= ../libnvpair.c \ + ../nvpair_alloc_system.c \ + $(SRC)/common/nvpair/nvpair_alloc_fixed.c \ + $(SRC)/common/nvpair/nvpair.c + +SRCDIR= .. +MAPDIR= ../spec/$(TRANSMACH) +SPECMAPFILE= $(MAPDIR)/mapfile + +# +# Libraries added to the next line must be present in miniroot +# +LDLIBS += -lc -lnsl +LIBS = $(DYNLIB) $(LINTLIB) + +# turn off ptr-cast warnings +LINTFLAGS64 += -erroff=E_BAD_PTR_CAST_ALIGN + +CFLAGS += $(CCVERBOSE) +CPPFLAGS += -D_REENTRANT + +$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) + +.KEEP_STATE: + +all: $(LIBS) + +lint: lintcheck + +include ../../Makefile.targ + +pics/%.o: $(SRC)/common/nvpair/%.c + $(COMPILE.c) -o $@ $< + $(POST_PROCESS_O) diff --git a/usr/src/lib/libnvpair/amd64/Makefile b/usr/src/lib/libnvpair/amd64/Makefile new file mode 100644 index 0000000000..cb39a2beff --- /dev/null +++ b/usr/src/lib/libnvpair/amd64/Makefile @@ -0,0 +1,32 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +include ../Makefile.com +include ../../Makefile.lib.64 + +install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/lib/libnvpair/i386/Makefile b/usr/src/lib/libnvpair/i386/Makefile new file mode 100644 index 0000000000..af76f5ab90 --- /dev/null +++ b/usr/src/lib/libnvpair/i386/Makefile @@ -0,0 +1,31 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) diff --git a/usr/src/lib/libnvpair/inc.flg b/usr/src/lib/libnvpair/inc.flg new file mode 100644 index 0000000000..3412b0a70f --- /dev/null +++ b/usr/src/lib/libnvpair/inc.flg @@ -0,0 +1,29 @@ +#!/bin/sh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright (c) 2000 by Sun Microsystems, Inc. +# All rights reserved. +# +#pragma ident "%Z%%M% %I% %E% SMI" + +find_files "s.*" usr/src/common/nvpair diff --git a/usr/src/lib/libnvpair/libnvpair.c b/usr/src/lib/libnvpair/libnvpair.c new file mode 100644 index 0000000000..58a47f1f06 --- /dev/null +++ b/usr/src/lib/libnvpair/libnvpair.c @@ -0,0 +1,266 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <unistd.h> +#include <strings.h> +#include "libnvpair.h" + +/* + * libnvpair - A tools library for manipulating <name, value> pairs. + * + * This library provides routines packing an unpacking nv pairs + * for transporting data across process boundaries, transporting + * between kernel and userland, and possibly saving onto disk files. + */ + +static void +indent(FILE *fp, int depth) +{ + while (depth-- > 0) + (void) fprintf(fp, "\t"); +} + +/* + * nvlist_print - Prints elements in an event buffer + */ +static +void +nvlist_print_with_indent(FILE *fp, nvlist_t *nvl, int depth) +{ + int i; + char *name; + uint_t nelem; + nvpair_t *nvp; + + if (nvl == NULL) + return; + + indent(fp, depth); + (void) fprintf(fp, "nvlist version: %d\n", NVL_VERSION(nvl)); + + nvp = nvlist_next_nvpair(nvl, NULL); + + while (nvp) { + data_type_t type = nvpair_type(nvp); + + indent(fp, depth); + name = nvpair_name(nvp); + (void) fprintf(fp, "\t%s =", name); + nelem = 0; + switch (type) { + case DATA_TYPE_BOOLEAN: { + (void) fprintf(fp, " 1"); + break; + } + case DATA_TYPE_BOOLEAN_VALUE: { + boolean_t val; + (void) nvpair_value_boolean_value(nvp, &val); + (void) fprintf(fp, " %d", val); + break; + } + case DATA_TYPE_BYTE: { + uchar_t val; + (void) nvpair_value_byte(nvp, &val); + (void) fprintf(fp, " 0x%2.2x", val); + break; + } + case DATA_TYPE_INT8: { + int8_t val; + (void) nvpair_value_int8(nvp, &val); + (void) fprintf(fp, " %d", val); + break; + } + case DATA_TYPE_UINT8: { + uint8_t val; + (void) nvpair_value_uint8(nvp, &val); + (void) fprintf(fp, " 0x%x", val); + break; + } + case DATA_TYPE_INT16: { + int16_t val; + (void) nvpair_value_int16(nvp, &val); + (void) fprintf(fp, " %d", val); + break; + } + case DATA_TYPE_UINT16: { + uint16_t val; + (void) nvpair_value_uint16(nvp, &val); + (void) fprintf(fp, " 0x%x", val); + break; + } + case DATA_TYPE_INT32: { + int32_t val; + (void) nvpair_value_int32(nvp, &val); + (void) fprintf(fp, " %d", val); + break; + } + case DATA_TYPE_UINT32: { + uint32_t val; + (void) nvpair_value_uint32(nvp, &val); + (void) fprintf(fp, " 0x%x", val); + break; + } + case DATA_TYPE_INT64: { + int64_t val; + (void) nvpair_value_int64(nvp, &val); + (void) fprintf(fp, " %lld", (longlong_t)val); + break; + } + case DATA_TYPE_UINT64: { + uint64_t val; + (void) nvpair_value_uint64(nvp, &val); + (void) fprintf(fp, " 0x%llx", (u_longlong_t)val); + break; + } + case DATA_TYPE_STRING: { + char *val; + (void) nvpair_value_string(nvp, &val); + (void) fprintf(fp, " %s", val); + break; + } + case DATA_TYPE_BOOLEAN_ARRAY: { + boolean_t *val; + (void) nvpair_value_boolean_array(nvp, &val, &nelem); + for (i = 0; i < nelem; i++) + (void) fprintf(fp, " %d", val[i]); + break; + } + case DATA_TYPE_BYTE_ARRAY: { + uchar_t *val; + (void) nvpair_value_byte_array(nvp, &val, &nelem); + for (i = 0; i < nelem; i++) + (void) fprintf(fp, " 0x%2.2x", val[i]); + break; + } + case DATA_TYPE_INT8_ARRAY: { + int8_t *val; + (void) nvpair_value_int8_array(nvp, &val, &nelem); + for (i = 0; i < nelem; i++) + (void) fprintf(fp, " %d", val[i]); + break; + } + case DATA_TYPE_UINT8_ARRAY: { + uint8_t *val; + (void) nvpair_value_uint8_array(nvp, &val, &nelem); + for (i = 0; i < nelem; i++) + (void) fprintf(fp, " 0x%x", val[i]); + break; + } + case DATA_TYPE_INT16_ARRAY: { + int16_t *val; + (void) nvpair_value_int16_array(nvp, &val, &nelem); + for (i = 0; i < nelem; i++) + (void) fprintf(fp, " %d", val[i]); + break; + } + case DATA_TYPE_UINT16_ARRAY: { + uint16_t *val; + (void) nvpair_value_uint16_array(nvp, &val, &nelem); + for (i = 0; i < nelem; i++) + (void) fprintf(fp, " 0x%x", val[i]); + break; + } + case DATA_TYPE_INT32_ARRAY: { + int32_t *val; + (void) nvpair_value_int32_array(nvp, &val, &nelem); + for (i = 0; i < nelem; i++) + (void) fprintf(fp, " %d", val[i]); + break; + } + case DATA_TYPE_UINT32_ARRAY: { + uint32_t *val; + (void) nvpair_value_uint32_array(nvp, &val, &nelem); + for (i = 0; i < nelem; i++) + (void) fprintf(fp, " 0x%x", val[i]); + break; + } + case DATA_TYPE_INT64_ARRAY: { + int64_t *val; + (void) nvpair_value_int64_array(nvp, &val, &nelem); + for (i = 0; i < nelem; i++) + (void) fprintf(fp, " %lld", (longlong_t)val[i]); + break; + } + case DATA_TYPE_UINT64_ARRAY: { + uint64_t *val; + (void) nvpair_value_uint64_array(nvp, &val, &nelem); + for (i = 0; i < nelem; i++) + (void) fprintf(fp, " 0x%llx", + (u_longlong_t)val[i]); + break; + } + case DATA_TYPE_STRING_ARRAY: { + char **val; + (void) nvpair_value_string_array(nvp, &val, &nelem); + for (i = 0; i < nelem; i++) + (void) fprintf(fp, " %s", val[i]); + break; + } + case DATA_TYPE_HRTIME: { + hrtime_t val; + (void) nvpair_value_hrtime(nvp, &val); + (void) fprintf(fp, " 0x%llx", val); + break; + } + case DATA_TYPE_NVLIST: { + nvlist_t *val; + (void) nvpair_value_nvlist(nvp, &val); + (void) fprintf(fp, " (embedded nvlist)\n"); + nvlist_print_with_indent(fp, val, depth + 1); + indent(fp, depth + 1); + (void) fprintf(fp, "(end %s)\n", name); + break; + } + case DATA_TYPE_NVLIST_ARRAY: { + nvlist_t **val; + (void) nvpair_value_nvlist_array(nvp, &val, &nelem); + (void) fprintf(fp, " (array of embedded nvlists)\n"); + for (i = 0; i < nelem; i++) { + indent(fp, depth + 1); + (void) fprintf(fp, + "(start %s[%d])\n", name, i); + nvlist_print_with_indent(fp, val[i], depth + 1); + indent(fp, depth + 1); + (void) fprintf(fp, "(end %s[%d])\n", name, i); + } + break; + } + default: + (void) fprintf(fp, " unknown data type (%d)", type); + break; + } + (void) fprintf(fp, "\n"); + nvp = nvlist_next_nvpair(nvl, nvp); + } +} + +void +nvlist_print(FILE *fp, nvlist_t *nvl) +{ + nvlist_print_with_indent(fp, nvl, 0); +} diff --git a/usr/src/lib/libnvpair/libnvpair.h b/usr/src/lib/libnvpair/libnvpair.h new file mode 100644 index 0000000000..d1d25ea70e --- /dev/null +++ b/usr/src/lib/libnvpair/libnvpair.h @@ -0,0 +1,46 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _LIBNVPAIR_H +#define _LIBNVPAIR_H + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <sys/nvpair.h> +#include <stdlib.h> +#include <stdio.h> + +#ifdef __cplusplus +extern "C" { +#endif + +void nvlist_print(FILE *, nvlist_t *); + +#ifdef __cplusplus +} +#endif + +#endif /* _LIBNVPAIR_H */ diff --git a/usr/src/lib/libnvpair/llib-lnvpair b/usr/src/lib/libnvpair/llib-lnvpair new file mode 100644 index 0000000000..ffc733ad85 --- /dev/null +++ b/usr/src/lib/libnvpair/llib-lnvpair @@ -0,0 +1,32 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/*LINTLIBRARY*/ +/*PROTOLIB1*/ + +#include <libnvpair.h> diff --git a/usr/src/lib/libnvpair/nvpair_alloc_system.c b/usr/src/lib/libnvpair/nvpair_alloc_system.c new file mode 100644 index 0000000000..1aefc1004d --- /dev/null +++ b/usr/src/lib/libnvpair/nvpair_alloc_system.c @@ -0,0 +1,59 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <sys/nvpair.h> +#include <stdlib.h> + +/*ARGSUSED*/ +static void * +nv_alloc_sys(nv_alloc_t *nva, size_t size) +{ + return (malloc(size)); +} + +/*ARGSUSED*/ +static void +nv_free_sys(nv_alloc_t *nva, void *buf, size_t size) +{ + free(buf); +} + +const nv_alloc_ops_t system_ops_def = { + NULL, /* nv_ao_init() */ + NULL, /* nv_ao_fini() */ + nv_alloc_sys, /* nv_ao_alloc() */ + nv_free_sys, /* nv_ao_free() */ + NULL /* nv_ao_reset() */ +}; + +nv_alloc_t nv_alloc_nosleep_def = { + &system_ops_def, + NULL +}; + +nv_alloc_t *nv_alloc_nosleep = &nv_alloc_nosleep_def; diff --git a/usr/src/lib/libnvpair/sparc/Makefile b/usr/src/lib/libnvpair/sparc/Makefile new file mode 100644 index 0000000000..af76f5ab90 --- /dev/null +++ b/usr/src/lib/libnvpair/sparc/Makefile @@ -0,0 +1,31 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) diff --git a/usr/src/lib/libnvpair/sparcv9/Makefile b/usr/src/lib/libnvpair/sparcv9/Makefile new file mode 100644 index 0000000000..cb39a2beff --- /dev/null +++ b/usr/src/lib/libnvpair/sparcv9/Makefile @@ -0,0 +1,32 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +include ../Makefile.com +include ../../Makefile.lib.64 + +install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/lib/libnvpair/spec/Makefile b/usr/src/lib/libnvpair/spec/Makefile new file mode 100644 index 0000000000..5c6b2f57b7 --- /dev/null +++ b/usr/src/lib/libnvpair/spec/Makefile @@ -0,0 +1,30 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright (c) 2000 by Sun Microsystems, Inc. +# All rights reserved. +# +#pragma ident "%Z%%M% %I% %E% SMI" +# +# lib/libnvpair/spec/Makefile + +include $(SRC)/lib/Makefile.spec.arch diff --git a/usr/src/lib/libnvpair/spec/Makefile.targ b/usr/src/lib/libnvpair/spec/Makefile.targ new file mode 100644 index 0000000000..e10236057a --- /dev/null +++ b/usr/src/lib/libnvpair/spec/Makefile.targ @@ -0,0 +1,35 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright (c) 2000 by Sun Microsystems, Inc. +# All rights reserved. +# +#pragma ident "%Z%%M% %I% %E% SMI" +# +# lib/libnvpair/spec/Makefile.targ + +LIBRARY = libnvpair.a +VERS = .1 + +OBJECTS = nvpair.o + +SPECCPP = -I../.. diff --git a/usr/src/lib/libnvpair/spec/amd64/Makefile b/usr/src/lib/libnvpair/spec/amd64/Makefile new file mode 100644 index 0000000000..2a38c1cba9 --- /dev/null +++ b/usr/src/lib/libnvpair/spec/amd64/Makefile @@ -0,0 +1,42 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +include ../Makefile.targ + +# Add arch specific objects here +OBJECTS += + +include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.lib.64 + +# Uncomment the following if the linker complains +#amd64_C_PICFLAGS = -K PIC + +include $(SRC)/lib/Makefile.spec + +install: $(ROOTABILIB64) diff --git a/usr/src/lib/libnvpair/spec/i386/Makefile b/usr/src/lib/libnvpair/spec/i386/Makefile new file mode 100644 index 0000000000..b841b87a38 --- /dev/null +++ b/usr/src/lib/libnvpair/spec/i386/Makefile @@ -0,0 +1,42 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright (c) 2000 by Sun Microsystems, Inc. +# All rights reserved. +# +#pragma ident "%Z%%M% %I% %E% SMI" +# +# lib/libnvpair/spec/i386/Makefile + +include ../Makefile.targ + +# Add arch specific objects here +OBJECTS += + +include $(SRC)/lib/Makefile.lib + +# Uncomment the following if the linker complains +#i386_C_PICFLAGS = -K PIC + +include $(SRC)/lib/Makefile.spec + +install: $(ROOTABILIB) diff --git a/usr/src/lib/libnvpair/spec/nvpair.spec b/usr/src/lib/libnvpair/spec/nvpair.spec new file mode 100644 index 0000000000..91a63b7283 --- /dev/null +++ b/usr/src/lib/libnvpair/spec/nvpair.spec @@ -0,0 +1,703 @@ +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +#pragma ident "%Z%%M% %I% %E% SMI" +# +# lib/libnvpair/spec/nvpair.spec + +function nvlist_alloc +include <libnvpair.h> +declaration int nvlist_alloc(nvlist_t **nvlp, uint_t nvflag, int kmflag) +version SUNW_1.1 +end + +function nvlist_free +include <libnvpair.h> +declaration void nvlist_free(nvlist_t *nvl) +version SUNW_1.1 +end + +function nvlist_size +include <libnvpair.h> +declaration int nvlist_size(nvlist_t *nvl, size_t *size, int encoding) +version SUNW_1.1 +end + +function nvlist_pack +include <libnvpair.h> +declaration int nvlist_pack(nvlist_t *nvl, char **bufp, size_t *buflen, \ + int encoding, int kmflag) +version SUNW_1.1 +end + +function nvlist_unpack +include <libnvpair.h> +declaration int nvlist_unpack(char *buf, size_t buflen, nvlist_t **nvlp, \ + int kmflag) +version SUNW_1.1 +end + +function nvlist_dup +include <libnvpair.h> +declaration int nvlist_dup(nvlist_t *nvl, nvlist_t **nvlp, int kmflag) +version SUNW_1.1 +end + +function nvlist_remove +include <libnvpair.h> +declaration int nvlist_remove(nvlist_t *nvl, const char *name, \ + data_type_t type) +version SUNW_1.2 +end + +function nvlist_remove_all +include <libnvpair.h> +declaration int nvlist_remove_all(nvlist_t *nvl, const char *name) +version SUNW_1.2 +end + +function nv_alloc_init +include <libnvpair.h> +declaration int nv_alloc_init(nv_alloc_t *nva, const nv_alloc_ops_t *nvo, \ + /* args */ ...) +version SUNW_1.2 +end + +function nv_alloc_reset +include <libnvpair.h> +declaration void nv_alloc_reset(nv_alloc_t *nva) +version SUNW_1.2 +end + +function nv_alloc_fini +include <libnvpair.h> +declaration void nv_alloc_fini(nv_alloc_t *nva) +version SUNW_1.2 +end + +function nvlist_xalloc +include <libnvpair.h> +declaration int nvlist_xalloc(nvlist_t **nvlp, uint_t nvflag, \ + nv_alloc_t *nva) +version SUNW_1.2 +end + +function nvlist_xpack +include <libnvpair.h> +declaration int nvlist_xpack(nvlist_t *nvl, char **bufp, size_t *buflen, \ + int encoding, nv_alloc_t *nva) +version SUNW_1.2 +end + +function nvlist_xunpack +include <libnvpair.h> +declaration int nvlist_xunpack(char *buf, size_t buflen, \ + nvlist_t **nvlp, nv_alloc_t *nva) +version SUNW_1.2 +end + +function nvlist_xdup +include <libnvpair.h> +declaration int nvlist_xdup(nvlist_t *nvl, nvlist_t **nvlp, \ + nv_alloc_t *nva) +version SUNW_1.2 +end + +function nvlist_lookup_nv_alloc +include <libnvpair.h> +declaration nv_alloc_t *nvlist_lookup_nv_alloc(nvlist_t *nvl) +version SUNW_1.2 +end + +function nvlist_add_boolean +include <libnvpair.h> +declaration int nvlist_add_boolean(nvlist_t *nvl, const char *name) +version SUNW_1.1 +end + +function nvlist_add_boolean_value +include <libnvpair.h> +declaration int nvlist_add_boolean_value(nvlist_t *nvl, const char *name, \ + boolean_t val) +version SUNW_1.2 +end + +function nvlist_add_byte +include <libnvpair.h> +declaration int nvlist_add_byte(nvlist_t *nvl, const char *name, \ + uchar_t val) +version SUNW_1.1 +end + +function nvlist_add_int8 +include <libnvpair.h> +declaration int nvlist_add_int8(nvlist_t *nvl, const char *name, int8_t val) +version SUNW_1.2 +end + +function nvlist_add_uint8 +include <libnvpair.h> +declaration int nvlist_add_uint8(nvlist_t *nvl, const char *name, \ + uint8_t val) +version SUNW_1.2 +end + +function nvlist_add_int16 +include <libnvpair.h> +declaration int nvlist_add_int16(nvlist_t *nvl, const char *name, \ + int16_t val) +version SUNW_1.1 +end + +function nvlist_add_uint16 +include <libnvpair.h> +declaration int nvlist_add_uint16(nvlist_t *nvl, const char *name, \ + uint16_t val) +version SUNW_1.1 +end + +function nvlist_add_int32 +include <libnvpair.h> +declaration int nvlist_add_int32(nvlist_t *nvl, const char *name, \ + int32_t val) +version SUNW_1.1 +end + +function nvlist_add_uint32 +include <libnvpair.h> +declaration int nvlist_add_uint32(nvlist_t *nvl, const char *name, \ + uint32_t val) +version SUNW_1.1 +end + +function nvlist_add_int64 +include <libnvpair.h> +declaration int nvlist_add_int64(nvlist_t *nvl, const char *name, \ + int64_t val) +version SUNW_1.1 +end + +function nvlist_add_uint64 +include <libnvpair.h> +declaration int nvlist_add_uint64(nvlist_t *nvl, const char *name, \ + uint64_t val) +version SUNW_1.1 +end + +function nvlist_add_string +include <libnvpair.h> +declaration int nvlist_add_string(nvlist_t *nvl, const char *name, \ + const char *val) +version SUNW_1.1 +end + +function nvlist_add_nvlist +include <libnvpair.h> +declaration int nvlist_add_nvlist(nvlist_t *nvl, const char *name, \ + nvlist_t *val) +version SUNW_1.1.1 +end + +function nvlist_add_boolean_array +include <libnvpair.h> +declaration int nvlist_add_boolean_array(nvlist_t *nvl, const char *name, \ + boolean_t *val, uint_t nelem) +version SUNW_1.2 +end +function nvlist_add_byte_array +include <libnvpair.h> +declaration int nvlist_add_byte_array(nvlist_t *nvl, const char *name, \ + uchar_t *val, uint_t nelem) +version SUNW_1.1 +end + +function nvlist_add_int8_array +include <libnvpair.h> +declaration int nvlist_add_int8_array(nvlist_t *nvl, const char *name, \ + int8_t *val, uint_t nelem) +version SUNW_1.2 +end + +function nvlist_add_uint8_array +include <libnvpair.h> +declaration int nvlist_add_uint8_array(nvlist_t *nvl, const char *name, \ + uint8_t *val, uint_t nelem) +version SUNW_1.2 +end + +function nvlist_add_int16_array +include <libnvpair.h> +declaration int nvlist_add_int16_array(nvlist_t *nvl, const char *name, \ + int16_t *val, uint_t nelem) +version SUNW_1.1 +end + +function nvlist_add_uint16_array +include <libnvpair.h> +declaration int nvlist_add_uint16_array(nvlist_t *nvl, const char *name, \ + uint16_t *val, uint_t nelem) +version SUNW_1.1 +end + +function nvlist_add_int32_array +include <libnvpair.h> +declaration int nvlist_add_int32_array(nvlist_t *nvl, const char *name, \ + int32_t *val, uint_t nelem) +version SUNW_1.1 +end + +function nvlist_add_uint32_array +include <libnvpair.h> +declaration int nvlist_add_uint32_array(nvlist_t *nvl, const char *name, \ + uint32_t *val, uint_t nelem) +version SUNW_1.1 +end + +function nvlist_add_int64_array +include <libnvpair.h> +declaration int nvlist_add_int64_array(nvlist_t *nvl, const char *name, \ + int64_t *val, uint_t nelem) +version SUNW_1.1 +end + +function nvlist_add_uint64_array +include <libnvpair.h> +declaration int nvlist_add_uint64_array(nvlist_t *nvl, const char *name, \ + uint64_t *val, uint_t nelem) +version SUNW_1.1 +end + +function nvlist_add_string_array +include <libnvpair.h> +declaration int nvlist_add_string_array(nvlist_t *nvl, const char *name, \ + char *const *val, uint_t nelem) +version SUNW_1.1 +end + +function nvlist_add_nvlist_array +include <libnvpair.h> +declaration int nvlist_add_nvlist_array(nvlist_t *nvl, const char *name, \ + nvlist_t **val, uint_t nelem) +version SUNW_1.1.1 +end + +function nvlist_add_hrtime +include <libnvpair.h> +declaration int nvlist_add_hrtime(nvlist_t *nvl, const char *name, \ + hrtime_t val) +version SUNWprivate_1.1 +end + +function nvlist_lookup_boolean +include <libnvpair.h> +declaration int nvlist_lookup_boolean(nvlist_t *nvl, const char *name) +version SUNW_1.1 +end + +function nvlist_lookup_boolean_value +include <libnvpair.h> +declaration int nvlist_lookup_boolean_value(nvlist_t *nvl, \ + const char *name, boolean_t *val) +version SUNW_1.2 +end + +function nvlist_lookup_byte +include <libnvpair.h> +declaration int nvlist_lookup_byte(nvlist_t *nvl, const char *name, \ + uchar_t *val) +version SUNW_1.1 +end + +function nvlist_lookup_int8 +include <libnvpair.h> +declaration int nvlist_lookup_int8(nvlist_t *nvl, const char *name, \ + int8_t *val) +version SUNW_1.2 +end + +function nvlist_lookup_uint8 +include <libnvpair.h> +declaration int nvlist_lookup_uint8(nvlist_t *nvl, const char *name, \ + uint8_t *val) +version SUNW_1.2 +end + +function nvlist_lookup_int16 +include <libnvpair.h> +declaration int nvlist_lookup_int16(nvlist_t *nvl, const char *name, \ + int16_t *val) +version SUNW_1.1 +end + +function nvlist_lookup_uint16 +include <libnvpair.h> +declaration int nvlist_lookup_uint16(nvlist_t *nvl, const char *name, \ + uint16_t *val) +version SUNW_1.1 +end + +function nvlist_lookup_int32 +include <libnvpair.h> +declaration int nvlist_lookup_int32(nvlist_t *nvl, const char *name, \ + int32_t *val) +version SUNW_1.1 +end + +function nvlist_lookup_uint32 +include <libnvpair.h> +declaration int nvlist_lookup_uint32(nvlist_t *nvl, const char *name, \ + uint32_t *val) +version SUNW_1.1 +end + +function nvlist_lookup_int64 +include <libnvpair.h> +declaration int nvlist_lookup_int64(nvlist_t *nvl, const char *name, \ + int64_t *val) +version SUNW_1.1 +end + +function nvlist_lookup_uint64 +include <libnvpair.h> +declaration int nvlist_lookup_uint64(nvlist_t *nvl, const char *name, \ + uint64_t *val) +version SUNW_1.1 +end + +function nvlist_lookup_string +include <libnvpair.h> +declaration int nvlist_lookup_string(nvlist_t *nvl, const char *name, \ + char **val) +version SUNW_1.1 +end + +function nvlist_lookup_nvlist +include <libnvpair.h> +declaration int nvlist_lookup_nvlist(nvlist_t *nvl, const char *name, \ + nvlist_t **val) +version SUNW_1.1.1 +end + +function nvlist_lookup_boolean_array +include <libnvpair.h> +declaration int nvlist_lookup_boolean_array(nvlist_t *nvl, \ + const char *name, boolean_t **val, uint_t *nelem) +version SUNW_1.2 +end + +function nvlist_lookup_byte_array +include <libnvpair.h> +declaration int nvlist_lookup_byte_array(nvlist_t *nvl, const char *name, \ + uchar_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvlist_lookup_int8_array +include <libnvpair.h> +declaration int nvlist_lookup_int8_array(nvlist_t *nvl, const char *name, \ + int8_t **val, uint_t *nelem) +version SUNW_1.2 +end + +function nvlist_lookup_uint8_array +include <libnvpair.h> +declaration int nvlist_lookup_uint8_array(nvlist_t *nvl, const char *name, \ + uint8_t **val, uint_t *nelem) +version SUNW_1.2 +end + +function nvlist_lookup_int16_array +include <libnvpair.h> +declaration int nvlist_lookup_int16_array(nvlist_t *nvl, const char *name, \ + int16_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvlist_lookup_uint16_array +include <libnvpair.h> +declaration int nvlist_lookup_uint16_array(nvlist_t *nvl, \ + const char *name, uint16_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvlist_lookup_int32_array +include <libnvpair.h> +declaration int nvlist_lookup_int32_array(nvlist_t *nvl, const char *name, \ + int32_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvlist_lookup_uint32_array +include <libnvpair.h> +declaration int nvlist_lookup_uint32_array(nvlist_t *nvl, \ + const char *name, uint32_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvlist_lookup_int64_array +include <libnvpair.h> +declaration int nvlist_lookup_int64_array(nvlist_t *nvl, const char *name, \ + int64_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvlist_lookup_uint64_array +include <libnvpair.h> +declaration int nvlist_lookup_uint64_array(nvlist_t *nvl, \ + const char *name, uint64_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvlist_lookup_string_array +include <libnvpair.h> +declaration int nvlist_lookup_string_array(nvlist_t *nvl, \ + const char *name, char ***val, uint_t *nelem) +version SUNW_1.1 +end + +function nvlist_lookup_nvlist_array +include <libnvpair.h> +declaration int nvlist_lookup_nvlist_array(nvlist_t *nvl, \ + const char *name, nvlist_t ***val, uint_t *nelem) +version SUNW_1.1.1 +end + +function nvlist_lookup_hrtime +include <libnvpair.h> +declaration int nvlist_lookup_hrtime(nvlist_t *nvl, const char *name, \ + hrtime_t *val) +version SUNWprivate_1.1 +end + +function nvlist_lookup_pairs +include <libnvpair.h> +declaration int nvlist_lookup_pairs(nvlist_t *nvl, int flag, ...) +version SUNW_1.2 +end + +function nvlist_next_nvpair +include <libnvpair.h> +declaration nvpair_t *nvlist_next_nvpair(nvlist_t *nvl, nvpair_t *nvpair) +version SUNW_1.1 +end + +function nvpair_name +include <libnvpair.h> +declaration char *nvpair_name(nvpair_t *nvp) +version SUNW_1.1 +end + +function nvpair_type +include <libnvpair.h> +declaration data_type_t nvpair_type(nvpair_t *nvpair) +version SUNW_1.1 +end + +function nvpair_value_boolean_value +include <libnvpair.h> +declaration int nvpair_value_boolean_value(nvpair_t *nvpair, boolean_t *val) +version SUNW_1.2 +end + +function nvpair_value_byte +include <libnvpair.h> +declaration int nvpair_value_byte(nvpair_t *nvpair, uchar_t *val) +version SUNW_1.1 +end + +function nvpair_value_int8 +include <libnvpair.h> +declaration int nvpair_value_int8(nvpair_t *nvpair, int8_t *val) +version SUNW_1.2 +end + +function nvpair_value_uint8 +include <libnvpair.h> +declaration int nvpair_value_uint8(nvpair_t *nvpair, uint8_t *val) +version SUNW_1.2 +end + +function nvpair_value_int16 +include <libnvpair.h> +declaration int nvpair_value_int16(nvpair_t *nvpair, int16_t *val) +version SUNW_1.1 +end + +function nvpair_value_uint16 +include <libnvpair.h> +declaration int nvpair_value_uint16(nvpair_t *nvpair, uint16_t *val) +version SUNW_1.1 +end + +function nvpair_value_int32 +include <libnvpair.h> +declaration int nvpair_value_int32(nvpair_t *nvpair, int32_t *val) +version SUNW_1.1 +end + +function nvpair_value_uint32 +include <libnvpair.h> +declaration int nvpair_value_uint32(nvpair_t *nvpair, uint32_t *val) +version SUNW_1.1 +end + +function nvpair_value_int64 +include <libnvpair.h> +declaration int nvpair_value_int64(nvpair_t *nvpair, int64_t *val) +version SUNW_1.1 +end + +function nvpair_value_uint64 +include <libnvpair.h> +declaration int nvpair_value_uint64(nvpair_t *nvpair, uint64_t *val) +version SUNW_1.1 +end + +function nvpair_value_string +include <libnvpair.h> +declaration int nvpair_value_string(nvpair_t *nvpair, char **val) +version SUNW_1.1 +end + +function nvpair_value_nvlist +include <libnvpair.h> +declaration int nvpair_value_nvlist(nvpair_t *nvpair, nvlist_t **val) +version SUNW_1.1.1 +end + +function nvpair_value_boolean_array +include <libnvpair.h> +declaration int nvpair_value_boolean_array(nvpair_t *nvpair, \ + boolean_t **val, uint_t *nelem) +version SUNW_1.2 +end + +function nvpair_value_byte_array +include <libnvpair.h> +declaration int nvpair_value_byte_array(nvpair_t *nvpair, \ + uchar_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvpair_value_int8_array +include <libnvpair.h> +declaration int nvpair_value_int8_array(nvpair_t *nvpair, \ + int8_t **val, uint_t *nelem) +version SUNW_1.2 +end + +function nvpair_value_uint8_array +include <libnvpair.h> +declaration int nvpair_value_uint8_array(nvpair_t *nvpair, \ + uint8_t **val, uint_t *nelem) +version SUNW_1.2 +end + +function nvpair_value_int16_array +include <libnvpair.h> +declaration int nvpair_value_int16_array(nvpair_t *nvpair, \ + int16_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvpair_value_uint16_array +include <libnvpair.h> +declaration int nvpair_value_uint16_array(nvpair_t *nvpair, \ + uint16_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvpair_value_int32_array +include <libnvpair.h> +declaration int nvpair_value_int32_array(nvpair_t *nvpair, \ + int32_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvpair_value_uint32_array +include <libnvpair.h> +declaration int nvpair_value_uint32_array(nvpair_t *nvpair, \ + uint32_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvpair_value_int64_array +include <libnvpair.h> +declaration int nvpair_value_int64_array(nvpair_t *nvpair, \ + int64_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvpair_value_uint64_array +include <libnvpair.h> +declaration int nvpair_value_uint64_array(nvpair_t *nvpair, \ + uint64_t **val, uint_t *nelem) +version SUNW_1.1 +end + +function nvpair_value_string_array +include <libnvpair.h> +declaration int nvpair_value_string_array(nvpair_t *nvpair, \ + char ***val, uint_t *nelem) +version SUNW_1.1 +end + +function nvpair_value_nvlist_array +include <libnvpair.h> +declaration int nvpair_value_nvlist_array(nvpair_t *nvpair, \ + nvlist_t ***val, uint_t *nelem) +version SUNW_1.1.1 +end + +function nvlist_merge +include <libnvpair.h> +declaration int nvlist_merge(nvlist_t *dst, nvlist_t *nvl, int flag) +version SUNW_1.2 +end + +function nvlist_add_nvpair +include <libnvpair.h> +declaration int nvlist_add_nvpair(nvlist_t *nvlist, nvpair_t *nvpair) +version SUNW_1.2 +end + +function nvpair_value_hrtime +include <libnvpair.h> +declaration int nvpair_value_hrtime(nvpair_t *nvpair, hrtime_t *val) +version SUNWprivate_1.1 +end + +function nvlist_print +include <libnvpair.h> +declaration void nvlist_print(FILE *fp, nvlist_t *nvl) +version SUNWprivate_1.1 +end + +data nv_alloc_nosleep +version SUNW_1.2 +end + +data nv_fixed_ops +version SUNW_1.2 +end diff --git a/usr/src/lib/libnvpair/spec/sparc/Makefile b/usr/src/lib/libnvpair/spec/sparc/Makefile new file mode 100644 index 0000000000..449e83e1ee --- /dev/null +++ b/usr/src/lib/libnvpair/spec/sparc/Makefile @@ -0,0 +1,44 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright (c) 2000 by Sun Microsystems, Inc. +# All rights reserved. +# +#pragma ident "%Z%%M% %I% %E% SMI" +# +# lib/libnvpair/spec/sparc/Makefile + +.KEEP_STATE: + +include ../Makefile.targ + +# Add arch specific objects here +OBJECTS += + +include $(SRC)/lib/Makefile.lib + +# Uncomment the following if the linker complains +#sparc_C_PICFLAGS = -K PIC + +include $(SRC)/lib/Makefile.spec + +install: $(ROOTABILIB) diff --git a/usr/src/lib/libnvpair/spec/sparcv9/Makefile b/usr/src/lib/libnvpair/spec/sparcv9/Makefile new file mode 100644 index 0000000000..c2d56769e8 --- /dev/null +++ b/usr/src/lib/libnvpair/spec/sparcv9/Makefile @@ -0,0 +1,43 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright (c) 2000 by Sun Microsystems, Inc. +# All rights reserved. +# +#pragma ident "%Z%%M% %I% %E% SMI" +# +# lib/libnvpair/spec/sparcv9/Makefile + +include ../Makefile.targ + +# Add arch specific objects here +OBJECTS += + +include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.lib.64 + +# Uncomment the following if the linker complains +#sparcv9_C_PICFLAGS = -K PIC + +include $(SRC)/lib/Makefile.spec + +install: $(ROOTABILIB64) diff --git a/usr/src/lib/libnvpair/spec/versions b/usr/src/lib/libnvpair/spec/versions new file mode 100644 index 0000000000..956b4e7a99 --- /dev/null +++ b/usr/src/lib/libnvpair/spec/versions @@ -0,0 +1,54 @@ +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# ident "%Z%%M% %I% %E% SMI" +# + +sparc { + SUNW_1.2: {SUNW_1.1.1}; + SUNW_1.1.1: {SUNW_1.1}; + SUNW_1.1; + SUNWprivate_1.1; +} + +sparcv9 { + SUNW_1.2: {SUNW_1.1.1}; + SUNW_1.1.1: {SUNW_1.1}; + SUNW_1.1; + SUNWprivate_1.1; +} + +i386 { + SUNW_1.2: {SUNW_1.1.1}; + SUNW_1.1.1: {SUNW_1.1}; + SUNW_1.1; + SUNWprivate_1.1; +} + +amd64 { + SUNW_1.2: {SUNW_1.1.1}; + SUNW_1.1.1: {SUNW_1.1}; + SUNW_1.1; + SUNWprivate_1.1; +} |
