summaryrefslogtreecommitdiff
path: root/usr/src/boot/libsa/nullfs.c
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2022-02-22 18:00:48 -0600
committerRichard Lowe <richlowe@richlowe.net>2022-02-22 18:00:48 -0600
commit3971085411b91c5d82e278443ab68fca1946cb21 (patch)
tree8e6d01d8aea1c3d8179a47b929ff5bfa8b42f752 /usr/src/boot/libsa/nullfs.c
parent1df45418ec3688847e142a9a2213965459ff39c7 (diff)
parentca783257c986cddcc674ae22916a6766b98a2d36 (diff)
downloadillumos-joyent-3971085411b91c5d82e278443ab68fca1946cb21.tar.gz
Merge branch 'master' of https://github.com/illumos/illumos-gate into man/big-reorg
# Conflicts: # usr/src/cmd/fmthard/fmthard.c # usr/src/cmd/zoneadmd/zcons.c # usr/src/man/man2/chmod.2 # usr/src/man/man2/close.2 # usr/src/man/man2/open.2 # usr/src/man/man3c/grantpt.3c # usr/src/man/man3c/posix_openpt.3c # usr/src/man/man3c/ptsname.3c # usr/src/man/man3c/unlockpt.3c # usr/src/man/man3utempter/utempter_add_record.3utempter # usr/src/man/man4/Makefile # usr/src/man/man4d/ptm.4d # usr/src/man/man4d/pts.4d # usr/src/man/man4d/pty.4d # usr/src/man/man4d/zcons.4d # usr/src/man/man4m/pckt.4m # usr/src/man/man4m/ptem.4m # usr/src/man/man4p/vxlan.7p # usr/src/man/man5/Makefile # usr/src/man/man5/bhyve_config.5 # usr/src/man/man7d/Makefile # usr/src/man/man7p/Makefile # usr/src/man/man8/bhyve.8 # usr/src/man/man8/dladm.8 # usr/src/man/man8/flowadm.8 # usr/src/man/man8/fmthard.8 # usr/src/man/man8/in.rlogind.8 # usr/src/man/man8/in.telnetd.8 # usr/src/man/man8/nvmeadm.8 # usr/src/man/man8/pppd.8 # usr/src/pkg/manifests/SUNWcs.man4d.inc # usr/src/uts/common/io/zcons.c
Diffstat (limited to 'usr/src/boot/libsa/nullfs.c')
-rw-r--r--usr/src/boot/libsa/nullfs.c114
1 files changed, 114 insertions, 0 deletions
diff --git a/usr/src/boot/libsa/nullfs.c b/usr/src/boot/libsa/nullfs.c
new file mode 100644
index 0000000000..91fe6efb2c
--- /dev/null
+++ b/usr/src/boot/libsa/nullfs.c
@@ -0,0 +1,114 @@
+/* $NetBSD: nullfs.c,v 1.1 1996/01/13 22:25:39 leo Exp $ */
+
+/*
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * The Mach Operating System project at Carnegie-Mellon University.
+ *
+ * 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.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
+ *
+ * @(#)open.c 8.1 (Berkeley) 6/11/93
+ *
+ *
+ * Copyright (c) 1989, 1990, 1991 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Author: Alessandro Forin
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#include <sys/cdefs.h>
+
+#include "stand.h"
+
+/*
+ * Null filesystem
+ */
+int
+null_open(const char *path __unused, struct open_file *f __unused)
+{
+ return EINVAL;
+}
+
+int
+null_close(struct open_file *f __unused)
+{
+ return 0;
+}
+
+int
+null_read(struct open_file *f __unused, void *buf __unused,
+ size_t size __unused, size_t *resid __unused)
+{
+ return EIO;
+}
+
+int
+null_write(struct open_file *f __unused, const void *buf __unused,
+ size_t size __unused, size_t *resid __unused)
+{
+ return EROFS;
+}
+
+off_t
+null_seek(struct open_file *f __unused, off_t offset __unused,
+ int where __unused)
+{
+ errno = EIO;
+ return -1;
+}
+
+int
+null_stat(struct open_file *f __unused, struct stat *sb __unused)
+{
+ return EIO;
+}
+
+int
+null_readdir(struct open_file *f __unused, struct dirent *d __unused)
+{
+ return EIO;
+}