From 41552f46227d92f844b8f56df8ec605179118b81 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Wed, 15 Nov 1995 16:54:07 +0000 Subject: Formerly io-readable.c.~3~ --- libnetfs/io-readable.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libnetfs') diff --git a/libnetfs/io-readable.c b/libnetfs/io-readable.c index 51d04e44..c02f7429 100644 --- a/libnetfs/io-readable.c +++ b/libnetfs/io-readable.c @@ -18,6 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ +#include #include "netfs.h" #include "io_S.h" @@ -25,10 +26,12 @@ error_t netfs_S_io_readable (struct protid *user, mach_msg_type_number_t *amount) { + error_t err; + if (!user) return EOPNOTSUPP; - if (!(cred->po->openstat & O_READ)) + if (!(user->po->openstat & O_READ)) return EINVAL; mutex_lock (&user->po->np->lock); -- cgit v1.2.3