nullfs.c revision 165906
1163516Simp/* $NetBSD: nullfs.c,v 1.1 1996/01/13 22:25:39 leo Exp $ */ 2163516Simp 3163516Simp/*- 4163516Simp * Copyright (c) 1993 5163516Simp * The Regents of the University of California. All rights reserved. 6163516Simp * 7163516Simp * This code is derived from software contributed to Berkeley by 8163516Simp * The Mach Operating System project at Carnegie-Mellon University. 9163516Simp * 10163516Simp * Redistribution and use in source and binary forms, with or without 11163516Simp * modification, are permitted provided that the following conditions 12163516Simp * are met: 13163516Simp * 1. Redistributions of source code must retain the above copyright 14163516Simp * notice, this list of conditions and the following disclaimer. 15163516Simp * 2. Redistributions in binary form must reproduce the above copyright 16163516Simp * notice, this list of conditions and the following disclaimer in the 17163516Simp * documentation and/or other materials provided with the distribution. 18163516Simp * 4. Neither the name of the University nor the names of its contributors 19163516Simp * may be used to endorse or promote products derived from this software 20163516Simp * without specific prior written permission. 21163516Simp * 22163516Simp * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23163516Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24170002Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25170002Simp * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26170002Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27170002Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28170002Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29170002Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30170002Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31170002Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32170002Simp * SUCH DAMAGE. 33170002Simp * 34170002Simp * @(#)open.c 8.1 (Berkeley) 6/11/93 35170002Simp * 36170002Simp * 37170002Simp * Copyright (c) 1989, 1990, 1991 Carnegie Mellon University 38170002Simp * All Rights Reserved. 39170002Simp * 40170002Simp * Author: Alessandro Forin 41170002Simp * 42170002Simp * Permission to use, copy, modify and distribute this software and its 43170002Simp * documentation is hereby granted, provided that both the copyright 44170002Simp * notice and this permission notice appear in all copies of the 45170002Simp * software, derivative works or modified versions, and any portions 46170002Simp * thereof, and that both notices appear in supporting documentation. 47170002Simp * 48170002Simp * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 49170002Simp * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 50170002Simp * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 51163516Simp * 52163516Simp * Carnegie Mellon requests users of this software to return to 53163516Simp * 54163516Simp * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 55163516Simp * School of Computer Science 56163516Simp * Carnegie Mellon University 57163516Simp * Pittsburgh PA 15213-3890 58163516Simp * 59163516Simp * any improvements or extensions that they make and grant Carnegie the 60163516Simp * rights to redistribute these changes. 61163516Simp */ 62163516Simp 63163516Simp#include <sys/cdefs.h> 64163516Simp__FBSDID("$FreeBSD: head/lib/libstand/nullfs.c 165906 2007-01-09 01:02:06Z imp $"); 65163516Simp 66163516Simp#include "stand.h" 67163516Simp 68163516Simp/* 69163516Simp * Null filesystem 70163516Simp */ 71163516Simpint null_open (const char *path, struct open_file *f) 72163516Simp{ 73163516Simp return EINVAL; 74163516Simp} 75163516Simp 76163516Simpint null_close(struct open_file *f) 77163516Simp{ 78163516Simp return 0; 79163516Simp} 80163516Simp 81163516Simpint null_read (struct open_file *f, void *buf, size_t size, size_t *resid) 82163516Simp{ 83163516Simp return EIO; 84163516Simp} 85163516Simp 86163516Simpint null_write (struct open_file *f, void *buf, size_t size, size_t *resid) 87163516Simp{ 88163516Simp return EIO; 89183704Smav} 90163516Simp 91163516Simpoff_t null_seek (struct open_file *f, off_t offset, int where) 92163516Simp{ 93163516Simp errno = EIO; 94163516Simp return -1; 95163516Simp} 96163516Simp 97163516Simpint null_stat (struct open_file *f, struct stat *sb) 98163516Simp{ 99183468Simp return EIO; 100188044Simp} 101163516Simp 102163516Simpint null_readdir(struct open_file *f, struct dirent *d) 103163516Simp{ 104163516Simp return EIO; 105163516Simp} 106163516Simp