summaryrefslogtreecommitdiffstats
path: root/sys/lib/libsa/nullfs.c
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>1997-02-16 14:39:37 +0000
committermickey <mickey@openbsd.org>1997-02-16 14:39:37 +0000
commite76f679c153fe0e6f6cd51b95d1683674d96fd05 (patch)
tree37c26e335514ca52edf40c78693525a3ff6a82a8 /sys/lib/libsa/nullfs.c
parentMore rd changes that were missed... Still not working. (diff)
downloadwireguard-openbsd-e76f679c153fe0e6f6cd51b95d1683674d96fd05.tar.xz
wireguard-openbsd-e76f679c153fe0e6f6cd51b95d1683674d96fd05.zip
opendir, readdir, closedir (define NO_READDIR, if none required)
minor fix in cd9660 only ufs working, all the others are on the list....
Diffstat (limited to 'sys/lib/libsa/nullfs.c')
-rw-r--r--sys/lib/libsa/nullfs.c40
1 files changed, 25 insertions, 15 deletions
diff --git a/sys/lib/libsa/nullfs.c b/sys/lib/libsa/nullfs.c
index c7a55f92e7d..71f52022083 100644
--- a/sys/lib/libsa/nullfs.c
+++ b/sys/lib/libsa/nullfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nullfs.c,v 1.2 1996/09/23 14:19:00 mickey Exp $ */
+/* $OpenBSD: nullfs.c,v 1.3 1997/02/16 14:39:38 mickey Exp $ */
/* $NetBSD: open.c,v 1.9 1995/09/19 09:16:52 thorpej Exp $ */
/*-
@@ -70,37 +70,47 @@
/*
* Null filesystem
*/
-int null_open (char *path, struct open_file *f)
+int
+null_open (char *path, struct open_file *f)
{
- errno = EIO;
- return -1;
+ return EIO;
}
-int null_close(struct open_file *f)
+int
+null_close(struct open_file *f)
{
return 0;
}
-ssize_t null_read (struct open_file *f, void *buf, size_t size, size_t *resid)
+int
+null_read (struct open_file *f, void *buf, size_t size, size_t *resid)
{
- errno = EIO;
- return -1;
+ return EIO;
}
-ssize_t null_write (struct open_file *f, void *buf, size_t size, size_t *resid)
+int
+null_write (struct open_file *f, void *buf, size_t size, size_t *resid)
{
- errno = EIO;
- return -1;
+ return EIO;
}
-off_t null_seek (struct open_file *f, off_t offset, int where)
+off_t
+null_seek (struct open_file *f, off_t offset, int where)
{
errno = EIO;
return -1;
}
-int null_stat (struct open_file *f, struct stat *sb)
+int
+null_stat (struct open_file *f, struct stat *sb)
{
- errno = EIO;
- return -1;
+ return EIO;
+}
+
+#ifndef NO_READDIR
+int
+null_readdir (struct open_file *f, char *name)
+{
+ return EIO;
}
+#endif