From cf89e6e4b39497ecdef2f5f279dadce3cee3ccba Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 12 Dec 2008 14:37:13 -0800 Subject: [PATCH 1/2] Refresh Makefile --- lib/libzfs/Makefile.am | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/libzfs/Makefile.am b/lib/libzfs/Makefile.am index 90e7da05c7..1ba01e962f 100644 --- a/lib/libzfs/Makefile.am +++ b/lib/libzfs/Makefile.am @@ -2,7 +2,12 @@ include $(top_srcdir)/config/Rules.am DEFAULT_INCLUDES = \ -I${top_srcdir}/lib/libzfs/include \ - -I${top_srcdir}/lib/libspl/include + -I${top_srcdir}/lib/libspl/include \ + -I${top_srcdir}/lib/libnvpair/include \ + -I${top_srcdir}/lib/libuutil/include \ + -I${top_srcdir}/module/zcommon/include \ + -I${top_srcdir}/module/nvpair/include \ + -I${top_srcdir}/module/avl/include lib_LTLIBRARIES = libzfs.la From f981fad7c128688a58bb81bfbcc2791433a6f8b2 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 12 Dec 2008 14:41:45 -0800 Subject: [PATCH 2/2] Add 5 missing headers --- lib/libspl/include/priv.h | 37 ++++++++++++++ lib/libspl/include/sys/priv.h | 30 +++++++++++ lib/libspl/include/sys/varargs.h | 30 +++++++++++ lib/libspl/include/sys/zone.h | 30 +++++++++++ lib/libspl/include/ucred.h | 32 ++++++++++++ lib/libspl/include/zone.h | 86 ++++++++++++++++++++++++++++++++ 6 files changed, 245 insertions(+) create mode 100644 lib/libspl/include/priv.h create mode 100644 lib/libspl/include/sys/priv.h create mode 100644 lib/libspl/include/sys/varargs.h create mode 100644 lib/libspl/include/sys/zone.h create mode 100644 lib/libspl/include/ucred.h create mode 100644 lib/libspl/include/zone.h diff --git a/lib/libspl/include/priv.h b/lib/libspl/include/priv.h new file mode 100644 index 0000000000..873502b4f7 --- /dev/null +++ b/lib/libspl/include/priv.h @@ -0,0 +1,37 @@ +/* + * 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 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _PRIV_H +#define _PRIV_H + +#include + +/* Couldn't find this definition in OpenGrok */ +#define PRIV_SYS_CONFIG "sys_config" + +static inline boolean_t priv_ineffect(const char *priv) { return B_TRUE; } + +#endif diff --git a/lib/libspl/include/sys/priv.h b/lib/libspl/include/sys/priv.h new file mode 100644 index 0000000000..a7deb77f7e --- /dev/null +++ b/lib/libspl/include/sys/priv.h @@ -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 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SOL_SYS_PRIV_H +#define _SOL_SYS_PRIV_H + +#endif diff --git a/lib/libspl/include/sys/varargs.h b/lib/libspl/include/sys/varargs.h new file mode 100644 index 0000000000..19b81c0855 --- /dev/null +++ b/lib/libspl/include/sys/varargs.h @@ -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 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SOL_SYS_VARARGS_H +#define _SOL_SYS_VARARGS_H + +#endif diff --git a/lib/libspl/include/sys/zone.h b/lib/libspl/include/sys/zone.h new file mode 100644 index 0000000000..85b0150bd9 --- /dev/null +++ b/lib/libspl/include/sys/zone.h @@ -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 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SOL_SYS_ZONE_H +#define _SOL_SYS_ZONE_H + +#endif diff --git a/lib/libspl/include/ucred.h b/lib/libspl/include/ucred.h new file mode 100644 index 0000000000..e1c3342fbd --- /dev/null +++ b/lib/libspl/include/ucred.h @@ -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 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SOL_UCRED_H +#define _SOL_UCRED_H + +typedef int ucred_t; + +#endif diff --git a/lib/libspl/include/zone.h b/lib/libspl/include/zone.h new file mode 100644 index 0000000000..3c18b61059 --- /dev/null +++ b/lib/libspl/include/zone.h @@ -0,0 +1,86 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (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 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _ZONE_H +#define _ZONE_H + + + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define GLOBAL_ZONEID 0 +#define GLOBAL_ZONEID_NAME "global" + +/* + * Functions for mapping between id and name for active zones. + */ +extern zoneid_t getzoneid(void); +extern zoneid_t getzoneidbyname(const char *); +extern ssize_t getzonenamebyid(zoneid_t, char *, size_t); + +#if 0 + +/* + * NOTE + * + * The remaining contents of this file are private to the implementation + * of Solaris and are subject to change at any time without notice, + * Applications using these interfaces may fail to run on future releases. + */ + +extern int zonept(int, zoneid_t); +extern int zone_get_id(const char *, zoneid_t *); + +/* System call API */ +extern zoneid_t zone_create(const char *, const char *, + const struct priv_set *, const char *, size_t, const char *, size_t, int *, + int, int, const bslabel_t *, int); +extern int zone_boot(zoneid_t); +extern int zone_destroy(zoneid_t); +extern ssize_t zone_getattr(zoneid_t, int, void *, size_t); +extern int zone_setattr(zoneid_t, int, void *, size_t); +extern int zone_enter(zoneid_t); +extern int zone_list(zoneid_t *, uint_t *); +extern int zone_shutdown(zoneid_t); +extern int zone_version(int *); +extern int zone_add_datalink(zoneid_t, char *); +extern int zone_remove_datalink(zoneid_t, char *); +extern int zone_check_datalink(zoneid_t *, char *); +extern int zone_list_datalink(zoneid_t, int *, char *); + +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _ZONE_H */