From 33b8c87b89ac9a8cc821f34f0e1a18b3c6def1be Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 19 Jan 1995 07:29:37 +0000 Subject: Updated to new io_select protocol. --- libdiskfs/io-select.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/libdiskfs/io-select.c b/libdiskfs/io-select.c index 2e8f636d..e29e2a67 100644 --- a/libdiskfs/io-select.c +++ b/libdiskfs/io-select.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1994 Free Software Foundation + Copyright (C) 1994, 1995 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 @@ -22,25 +22,22 @@ /* Implement io_select as described in . */ kern_return_t diskfs_S_io_select (struct protid *cred, - int type, - mach_port_t port, - mach_msg_type_name_t porttype, - int tag, - int *possible) + int *type, + int *tag) { if (!cred) return EOPNOTSUPP; mutex_lock (&cred->po->np->lock); - if (((type & SELECT_READ) && !(cred->po->openstat & O_READ)) - || ((type & SELECT_WRITE) && !(cred->po->openstat & O_WRITE))) + if (((*type & SELECT_READ) && !(cred->po->openstat & O_READ)) + || ((*type & SELECT_WRITE) && !(cred->po->openstat & O_WRITE))) { mutex_unlock (&cred->po->np->lock); return EBADF; } mutex_unlock (&cred->po->np->lock); - /* Select is always possible */ + /* Select is always possible. */ mach_port_deallocate (mach_task_self (), port); - *possible = type & ~SELECT_URG; + *type &= ~SELECT_URG; return 0; } -- cgit v1.2.3