summaryrefslogtreecommitdiff
path: root/libdiskfs/io-modes-set.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-02-04 21:04:32 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-02-04 21:04:32 +0000
commit386b07b217936be58d268300d79873a46deb3dee (patch)
tree85ad3d1e0a6d3fd21de3010389f1eb817ac71712 /libdiskfs/io-modes-set.c
parentf7106f4d9428e0d9f4bdeae2bbd5d057e65be4a4 (diff)
Formerly io-modes-set.c.~3~
Diffstat (limited to 'libdiskfs/io-modes-set.c')
-rw-r--r--libdiskfs/io-modes-set.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libdiskfs/io-modes-set.c b/libdiskfs/io-modes-set.c
index 050b1c1c..ae1610ec 100644
--- a/libdiskfs/io-modes-set.c
+++ b/libdiskfs/io-modes-set.c
@@ -17,6 +17,7 @@
#include "priv.h"
#include "io_S.h"
+#include <fcntl.h>
/* Implement io_set_all_openmodes as described in <hurd/io.defs>. */
error_t
@@ -26,10 +27,9 @@ S_io_set_all_openmodes (struct protid *cred,
if (!cred)
return EOPNOTSUPP;
- mutex_lock (&cred->po->ip->lock);
- ioserver_get_conch (&np->conch);
- if (!err)
- cred->po->openstat = (modes & HONORED_STATE_MODES);
- mutex_unlock (&cred->po->ip->lock);
- return err;
+ mutex_lock (&cred->po->np->lock);
+ ioserver_get_conch (&cred->po->np->conch);
+ cred->po->openstat = (newbits & HONORED_STATE_MODES);
+ mutex_unlock (&cred->po->np->lock);
+ return 0;
}