diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-11-13 21:38:57 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-11-13 21:38:57 +0000 |
commit | 6a8e82146f6f66bad83bde9f7744bb1a1407f992 (patch) | |
tree | e3847525d2868555ca2323a50f45bd627c73a40a | |
parent | 22282e0dd9ac99da1ecf65d2240fb5dade64517a (diff) |
Formerly io-seek.c.~2~
-rw-r--r-- | libnetfs/io-seek.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libnetfs/io-seek.c b/libnetfs/io-seek.c index 63454ac7..a6066dce 100644 --- a/libnetfs/io-seek.c +++ b/libnetfs/io-seek.c @@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ #include "netfs.h" +#include "io_S.h" error_t netfs_S_io_seek (struct protid *user, @@ -34,17 +35,18 @@ netfs_S_io_seek (struct protid *user, { case SEEK_SET: err = 0; - cred->po->filepointer = offset; + user->po->filepointer = offset; break; case SEEK_CUR: err = 0; - cred->po->filepointer += offset; + user->po->filepointer += offset; break; case SEEK_END: - err = 0; - cred->po->filepointer = cred->po->np->nn_stat.st_size + offset; + err = netfs_validate_stat (user->po->np, user); + if (!err) + user->po->filepointer = user->po->np->nn_stat.st_size + offset; break; default: @@ -54,3 +56,4 @@ netfs_S_io_seek (struct protid *user, mutex_unlock (&user->po->np->lock); return err; } + |