summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs')
-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;
}