diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-11-15 16:54:07 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-11-15 16:54:07 +0000 |
commit | 41552f46227d92f844b8f56df8ec605179118b81 (patch) | |
tree | c2c4b43a46c51040b3f187973c275cdf03241fc1 /libnetfs | |
parent | 3ef14dc5033bcb02d48d8d842bac760ea2fd0cf1 (diff) |
Formerly io-readable.c.~3~
Diffstat (limited to 'libnetfs')
-rw-r--r-- | libnetfs/io-readable.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 <fcntl.h> #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); |