summaryrefslogtreecommitdiffstats
path: root/lib/libstand/nullfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libstand/nullfs.c')
-rw-r--r--lib/libstand/nullfs.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/libstand/nullfs.c b/lib/libstand/nullfs.c
index ae12cb0..fea4c7a 100644
--- a/lib/libstand/nullfs.c
+++ b/lib/libstand/nullfs.c
@@ -74,8 +74,7 @@ __FBSDID("$FreeBSD$");
*/
int null_open (const char *path, struct open_file *f)
{
- errno = EIO;
- return -1;
+ return EINVAL;
}
int null_close(struct open_file *f)
@@ -85,14 +84,12 @@ int null_close(struct open_file *f)
int null_read (struct open_file *f, void *buf, size_t size, size_t *resid)
{
- errno = EIO;
- return -1;
+ return EIO;
}
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)
@@ -103,12 +100,10 @@ off_t null_seek (struct open_file *f, off_t offset, int where)
int null_stat (struct open_file *f, struct stat *sb)
{
- errno = EIO;
- return -1;
+ return EIO;
}
int null_readdir(struct open_file *f, struct dirent *d)
{
- errno = EIO;
- return -1;
+ return EIO;
}
OpenPOWER on IntegriCloud