nullfs.c (84221) | nullfs.c (124811) |
---|---|
1/* $NetBSD: nullfs.c,v 1.1 1996/01/13 22:25:39 leo Exp $ */ 2 3/*- 4 * Copyright (c) 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * The Mach Operating System project at Carnegie-Mellon University. --- 51 unchanged lines hidden (view full) --- 60 * Carnegie Mellon University 61 * Pittsburgh PA 15213-3890 62 * 63 * any improvements or extensions that they make and grant Carnegie the 64 * rights to redistribute these changes. 65 */ 66 67#include <sys/cdefs.h> | 1/* $NetBSD: nullfs.c,v 1.1 1996/01/13 22:25:39 leo Exp $ */ 2 3/*- 4 * Copyright (c) 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * The Mach Operating System project at Carnegie-Mellon University. --- 51 unchanged lines hidden (view full) --- 60 * Carnegie Mellon University 61 * Pittsburgh PA 15213-3890 62 * 63 * any improvements or extensions that they make and grant Carnegie the 64 * rights to redistribute these changes. 65 */ 66 67#include <sys/cdefs.h> |
68__FBSDID("$FreeBSD: head/lib/libstand/nullfs.c 84221 2001-09-30 22:28:01Z dillon $"); | 68__FBSDID("$FreeBSD: head/lib/libstand/nullfs.c 124811 2004-01-21 20:12:23Z jhb $"); |
69 70#include "stand.h" 71 72/* 73 * Null filesystem 74 */ 75int null_open (const char *path, struct open_file *f) 76{ | 69 70#include "stand.h" 71 72/* 73 * Null filesystem 74 */ 75int null_open (const char *path, struct open_file *f) 76{ |
77 errno = EIO; 78 return -1; | 77 return EINVAL; |
79} 80 81int null_close(struct open_file *f) 82{ 83 return 0; 84} 85 86int null_read (struct open_file *f, void *buf, size_t size, size_t *resid) 87{ | 78} 79 80int null_close(struct open_file *f) 81{ 82 return 0; 83} 84 85int null_read (struct open_file *f, void *buf, size_t size, size_t *resid) 86{ |
88 errno = EIO; 89 return -1; | 87 return EIO; |
90} 91 92int null_write (struct open_file *f, void *buf, size_t size, size_t *resid) 93{ | 88} 89 90int null_write (struct open_file *f, void *buf, size_t size, size_t *resid) 91{ |
94 errno = EIO; 95 return -1; | 92 return EIO; |
96} 97 98off_t null_seek (struct open_file *f, off_t offset, int where) 99{ 100 errno = EIO; 101 return -1; 102} 103 104int null_stat (struct open_file *f, struct stat *sb) 105{ | 93} 94 95off_t null_seek (struct open_file *f, off_t offset, int where) 96{ 97 errno = EIO; 98 return -1; 99} 100 101int null_stat (struct open_file *f, struct stat *sb) 102{ |
106 errno = EIO; 107 return -1; | 103 return EIO; |
108} 109 110int null_readdir(struct open_file *f, struct dirent *d) 111{ | 104} 105 106int null_readdir(struct open_file *f, struct dirent *d) 107{ |
112 errno = EIO; 113 return -1; | 108 return EIO; |
114} | 109} |