summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-02-04 20:50:44 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-02-04 20:50:44 +0000
commit1900800c9ad6e3c4d9f8c3d0274cc8a27a5e2b65 (patch)
tree906dd69b379be0527d1f9f83b04a0a9e03b1d3ea
parentc75d7d8a1f4b8831a809872c5b5415fb03e74efe (diff)
Formerly io-readable.c.~3~
-rw-r--r--libdiskfs/io-readable.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libdiskfs/io-readable.c b/libdiskfs/io-readable.c
index 5bf8c0d7..7a82696c 100644
--- a/libdiskfs/io-readable.c
+++ b/libdiskfs/io-readable.c
@@ -17,6 +17,7 @@
#include "priv.h"
#include "io_S.h"
+#include <fcntl.h>
/* Implement io_readable as described in <hurd/io.defs>. */
error_t
@@ -24,7 +25,6 @@ diskfs_S_io_readable (struct protid *cred,
int *amount)
{
struct node *np;
- error_t err;
if (!cred)
return EOPNOTSUPP;
@@ -35,10 +35,9 @@ diskfs_S_io_readable (struct protid *cred,
np = cred->po->np;
mutex_lock (&np->lock);
- err = ioserver_get_conch (&np->conch);
- if (!err)
- *amount = np->dn_stat.st_size - cred->po->filepointer;
+ ioserver_get_conch (&np->conch);
+ *amount = np->dn_stat.st_size - cred->po->filepointer;
mutex_unlock (&np->lock);
- return err;
+ return 0;
}