summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-02-03 20:34:16 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-02-03 20:34:16 +0000
commitbd1e45e71493a8a6d79064b06112274662c93964 (patch)
treebc558fed3dd3c44f2d2af4456d542fee96e57b7b /libdiskfs
parent3e9721643367086d360220282905019000ef28e9 (diff)
Formerly io-seek.c.~2~
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/io-seek.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libdiskfs/io-seek.c b/libdiskfs/io-seek.c
index 89f797e1..f17bc04b 100644
--- a/libdiskfs/io-seek.c
+++ b/libdiskfs/io-seek.c
@@ -16,6 +16,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "priv.h"
+#include "io_S.h"
#define diskfs_readonly 0
@@ -29,7 +30,8 @@ diskfs_S_io_seek (struct protid *cred,
CHANGE_IP_FIELD (cred,
({
- if (!(err = ioserver_get_conch (&ip->i_conch)))
+ err = ioserver_get_conch (&np->i_conch);
+ if (!err)
switch (whence)
{
case SEEK_SET:
@@ -39,7 +41,8 @@ diskfs_S_io_seek (struct protid *cred,
cred->po->filepointer += offset;
break;
case SEEK_END:
- cred->po->filepointer = ip->di->di_size + offset;
+ cred->po->filepointer = (np->dn_stat.st_size
+ + offset);
break;
default:
err = EINVAL;