summaryrefslogtreecommitdiffstats
path: root/cddl/compat/opensolaris/include
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2007-04-06 01:09:06 +0000
committerpjd <pjd@FreeBSD.org>2007-04-06 01:09:06 +0000
commit3b005d330261f33318ca1ee3fef1940237fd788b (patch)
tree3061c8734d9ce560165e672836837a0f411a83c9 /cddl/compat/opensolaris/include
parent3be454b8211f48e634e6587f53807d3b5013e973 (diff)
downloadFreeBSD-src-3b005d330261f33318ca1ee3fef1940237fd788b.zip
FreeBSD-src-3b005d330261f33318ca1ee3fef1940237fd788b.tar.gz
Please welcome ZFS - The last word in file systems.
ZFS file system was ported from OpenSolaris operating system. The code in under CDDL license. I'd like to thank all SUN developers that created this great piece of software. Supported by: Wheel LTD (http://www.wheel.pl/) Supported by: The FreeBSD Foundation (http://www.freebsdfoundation.org/) Supported by: Sentex (http://www.sentex.net/)
Diffstat (limited to 'cddl/compat/opensolaris/include')
-rw-r--r--cddl/compat/opensolaris/include/devid.h49
-rw-r--r--cddl/compat/opensolaris/include/fsshare.h35
-rw-r--r--cddl/compat/opensolaris/include/libintl.h11
-rw-r--r--cddl/compat/opensolaris/include/mnttab.h19
-rw-r--r--cddl/compat/opensolaris/include/priv.h18
-rw-r--r--cddl/compat/opensolaris/include/solaris.h8
-rw-r--r--cddl/compat/opensolaris/include/zone.h6
7 files changed, 146 insertions, 0 deletions
diff --git a/cddl/compat/opensolaris/include/devid.h b/cddl/compat/opensolaris/include/devid.h
new file mode 100644
index 0000000..06839dd
--- /dev/null
+++ b/cddl/compat/opensolaris/include/devid.h
@@ -0,0 +1,49 @@
+/*
+ * 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 _OPENSOLARIS_DEVID_H_
+#define _OPENSOLARIS_DEVID_H_
+
+#include <sys/types.h>
+#include <stdlib.h>
+
+typedef int ddi_devid_t;
+
+typedef struct devid_nmlist {
+ char *devname;
+ dev_t dev;
+} devid_nmlist_t;
+
+static inline int devid_str_decode(char *devidstr, ddi_devid_t *retdevid, char **retminor_name) { abort(); }
+static inline int devid_deviceid_to_nmlist(char *search_path, ddi_devid_t devid, char *minor_name, devid_nmlist_t **retlist) { abort(); }
+static inline void devid_str_free(char *str) { abort(); }
+static inline void devid_free(ddi_devid_t devid) { abort(); }
+static inline void devid_free_nmlist(devid_nmlist_t *list) { abort(); }
+static inline int devid_get(int fd, ddi_devid_t *retdevid) { return -1; }
+static inline int devid_get_minor_name(int fd, char **retminor_name) { abort(); }
+static inline char *devid_str_encode(ddi_devid_t devid, char *minor_name) { abort(); }
+
+#endif /* !_OPENSOLARIS_DEVID_H_ */
diff --git a/cddl/compat/opensolaris/include/fsshare.h b/cddl/compat/opensolaris/include/fsshare.h
new file mode 100644
index 0000000..11a8dbf0
--- /dev/null
+++ b/cddl/compat/opensolaris/include/fsshare.h
@@ -0,0 +1,35 @@
+/*-
+ * Copyright (c) 2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _OPENSOLARIS_FSSHARE_H_
+#define _OPENSOLARIS_FSSHARE_H_
+
+int fsshare(const char *, const char *, const char *);
+int fsunshare(const char *, const char *);
+
+#endif /* !_OPENSOLARIS_FSSHARE_H_ */
diff --git a/cddl/compat/opensolaris/include/libintl.h b/cddl/compat/opensolaris/include/libintl.h
new file mode 100644
index 0000000..5954344
--- /dev/null
+++ b/cddl/compat/opensolaris/include/libintl.h
@@ -0,0 +1,11 @@
+#ifndef _LIBINTL_H_
+#define _LIBINTL_H_
+
+#include <sys/cdefs.h>
+#include <stdio.h>
+
+#define textdomain(domain) 0
+#define gettext(...) (__VA_ARGS__)
+#define dgettext(domain, ...) (__VA_ARGS__)
+
+#endif /* !_SOLARIS_H_ */
diff --git a/cddl/compat/opensolaris/include/mnttab.h b/cddl/compat/opensolaris/include/mnttab.h
new file mode 100644
index 0000000..6e7d28c
--- /dev/null
+++ b/cddl/compat/opensolaris/include/mnttab.h
@@ -0,0 +1,19 @@
+#ifndef _OPENSOLARIS_MNTTAB_H_
+#define _OPENSOLARIS_MNTTAB_H_
+
+#include <stdio.h>
+#include <paths.h>
+
+#define MNTTAB _PATH_DEVNULL
+#define MNT_LINE_MAX 1024
+
+struct mnttab {
+ char *mnt_special;
+ char *mnt_mountp;
+ char *mnt_fstype;
+ char *mnt_mntopts;
+};
+
+int getmntany(FILE *fd, struct mnttab *mgetp, struct mnttab *mrefp);
+
+#endif /* !_OPENSOLARIS_MNTTAB_H_ */
diff --git a/cddl/compat/opensolaris/include/priv.h b/cddl/compat/opensolaris/include/priv.h
new file mode 100644
index 0000000..78eae1a
--- /dev/null
+++ b/cddl/compat/opensolaris/include/priv.h
@@ -0,0 +1,18 @@
+#ifndef _OPENSOLARIS_PRIV_H_
+#define _OPENSOLARIS_PRIV_H_
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <assert.h>
+
+#define PRIV_SYS_CONFIG 0
+
+static __inline int
+priv_ineffect(priv)
+{
+
+ assert(priv == PRIV_SYS_CONFIG);
+ return (geteuid() == 0);
+}
+
+#endif /* !_OPENSOLARIS_PRIV_H_ */
diff --git a/cddl/compat/opensolaris/include/solaris.h b/cddl/compat/opensolaris/include/solaris.h
new file mode 100644
index 0000000..fbdd8c6
--- /dev/null
+++ b/cddl/compat/opensolaris/include/solaris.h
@@ -0,0 +1,8 @@
+#ifndef _SOLARIS_H_
+#define _SOLARIS_H_
+
+#include <sys/ccompile.h>
+
+#define dirent64 dirent
+
+#endif /* !_SOLARIS_H_ */
diff --git a/cddl/compat/opensolaris/include/zone.h b/cddl/compat/opensolaris/include/zone.h
new file mode 100644
index 0000000..487f02f
--- /dev/null
+++ b/cddl/compat/opensolaris/include/zone.h
@@ -0,0 +1,6 @@
+#ifndef _ZONE_H_
+#define _ZONE_H_
+
+#include <sys/zone.h>
+
+#endif /* !_ZONE_H_ */
OpenPOWER on IntegriCloud