diff options
Diffstat (limited to 'libtrivfs/io-write.c')
-rw-r--r-- | libtrivfs/io-write.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libtrivfs/io-write.c b/libtrivfs/io-write.c index 05b57fde..106031dd 100644 --- a/libtrivfs/io-write.c +++ b/libtrivfs/io-write.c @@ -1,5 +1,5 @@ -/* - Copyright (C) 1994 Free Software Foundation +/* + Copyright (C) 1994,99,2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -16,8 +16,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "priv.h" -#include "io_S.h" #include <assert.h> +#include <fcntl.h> kern_return_t trivfs_S_io_write (struct trivfs_protid *cred, @@ -28,6 +28,9 @@ trivfs_S_io_write (struct trivfs_protid *cred, off_t off, mach_msg_type_number_t *amt) { + if (!(trivfs_allow_open & O_WRITE)) + return EBADF; + assert (!trivfs_support_write); return EOPNOTSUPP; } |